Class: Uddi4r::Model
Overview
UDDI models are first-class Ruby objects that represent UDDI data structures. For more information about UDDI data structures, see: uddi.org/pubs/DataStructure-V2.03-Published-20020719.htm
These objects are used as arguments and return types for methods in Uddi4r::Client.
The following model objects are available:
-
ServiceInfo
-
BusinessInfo
-
BusinessList
-
ServiceList
-
TModelInstanceInfo
-
BindingTemplate
-
BindingDetail
-
RelatedBusinessesList
-
BusinessService
-
BusinessEntity
-
BusinessDetail
-
KeyedReference
-
OverviewDoc
-
CategoryBag
-
TModel
-
TModelBag
-
TModelDetail
-
TModelList
-
ServiceDetail
-
IdentifierBag
-
DiscoveryURLs
-
FindQualifiers
Direct Known Subclasses
AccessPoint, AuthToken, BindingDetail, BindingTemplate, BusinessDetail, BusinessEntity, BusinessInfo, BusinessList, BusinessService, CategoryBag, DiscoveryURLs, DispositionReport, ErrInfo, FindQualifiers, IdentifierBag, KeyedReference, OverviewDoc, RelatedBusinessesList, Result, ServiceDetail, ServiceInfo, ServiceList, TModel, TModelBag, TModelDetail, TModelInfo, TModelInstanceInfo, TModelList
Class Method Summary collapse
-
.create_from(response) ⇒ Object
Create a UDDI model object from REXML::Element using ROXML.parse().
-
.tag_name ⇒ Object
Define the default name to be first letter lower-case (UDDI naming convention) So, for example, ServiceInfo becomes serviceInfo.
Instance Method Summary collapse
-
#initialize {|_self| ... } ⇒ Model
constructor
Yield self if a block is passed.
Constructor Details
#initialize {|_self| ... } ⇒ Model
Yield self if a block is passed.
57 58 59 |
# File 'lib/uddi4r/models.rb', line 57 def initialize() yield self if block_given? end |
Class Method Details
.create_from(response) ⇒ Object
Create a UDDI model object from REXML::Element using ROXML.parse(). Handles nil.
49 50 51 52 53 54 |
# File 'lib/uddi4r/models.rb', line 49 def self.create_from(response) return nil unless response element = response.elements["*/*/#{self.tag_name()}"] return nil unless element self.parse(element) end |
.tag_name ⇒ Object
Define the default name to be first letter lower-case (UDDI naming convention) So, for example, ServiceInfo becomes serviceInfo
44 45 46 |
# File 'lib/uddi4r/models.rb', line 44 def self.tag_name @tag_name || self.name.to_s.gsub(/.*::/,"").gsub(/^(.)/) { $1.downcase } end |