Class: HealthVault::WCData::Thing::Common
- Inherits:
-
ComplexType
- Object
- ComplexType
- HealthVault::WCData::Thing::Common
- Defined in:
- lib/wc_data/generated/thing/common.rb
Instance Attribute Summary
Attributes inherited from ComplexType
Instance Method Summary collapse
-
#add_extension(value) ⇒ Object
value is a HealthVault::WCData::Thing::Extension.
-
#add_related_thing(value) ⇒ Object
value is a HealthVault::WCData::Thing::RelatedThing.
-
#extension ⇒ Object
returns: a HealthVault::WCData::Thing::Extension Array.
-
#initialize ⇒ Common
constructor
A new instance of Common.
-
#note ⇒ Object
returns: a String.
-
#note=(value) ⇒ Object
value is a String.
-
#related_thing ⇒ Object
remarks: This relationship is completely application defined and maintained.
-
#remove_extension(value) ⇒ Object
value is a #HealthVault::WCData::Thing::Extension.
-
#remove_related_thing(value) ⇒ Object
value is a #HealthVault::WCData::Thing::RelatedThing.
-
#source ⇒ Object
returns: a String.
-
#source=(value) ⇒ Object
value is a String.
-
#tags ⇒ Object
returns: a HealthVault::WCData::Types::String512.
-
#tags=(value) ⇒ Object
value is a HealthVault::WCData::Types::String512.
Methods inherited from ComplexType
#add_new_to_children, #element, #method_missing, #optional_elements, #parse_element, #query_elements, #required_elements, #to_s, #valid?
Constructor Details
#initialize ⇒ Common
Returns a new instance of Common.
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/wc_data/generated/thing/common.rb', line 94 def initialize super self.tag_name = 'common' @children['source'] = {:name => 'source', :class => String, :value => nil, :min => 0, :max => 1, :order => 1, :place => :element, :choice => 0 } @children['note'] = {:name => 'note', :class => String, :value => nil, :min => 0, :max => 1, :order => 2, :place => :element, :choice => 0 } @children['tags'] = {:name => 'tags', :class => HealthVault::WCData::Types::String512, :value => nil, :min => 0, :max => 1, :order => 3, :place => :element, :choice => 0 } @children['extension'] = {:name => 'extension', :class => HealthVault::WCData::Thing::Extension, :value => Array.new, :min => 0, :max => 999999, :order => 4, :place => :element, :choice => 0 } @children['related-thing'] = {:name => 'related-thing', :class => HealthVault::WCData::Thing::RelatedThing, :value => Array.new, :min => 0, :max => 999999, :order => 5, :place => :element, :choice => 0 } end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class HealthVault::WCData::ComplexType
Instance Method Details
#add_extension(value) ⇒ Object
value is a HealthVault::WCData::Thing::Extension
57 58 59 |
# File 'lib/wc_data/generated/thing/common.rb', line 57 def add_extension(value) @children['extension'][:value] << value end |
#add_related_thing(value) ⇒ Object
value is a HealthVault::WCData::Thing::RelatedThing
75 76 77 |
# File 'lib/wc_data/generated/thing/common.rb', line 75 def (value) @children['related-thing'][:value] << value end |
#extension ⇒ Object
returns: a HealthVault::WCData::Thing::Extension Array
68 69 70 |
# File 'lib/wc_data/generated/thing/common.rb', line 68 def extension return @children['extension'][:value] end |
#note ⇒ Object
returns: a String
37 38 39 |
# File 'lib/wc_data/generated/thing/common.rb', line 37 def note return @children['note'][:value] end |
#note=(value) ⇒ Object
value is a String
32 33 34 |
# File 'lib/wc_data/generated/thing/common.rb', line 32 def note=(value) @children['note'][:value] = value end |
#related_thing ⇒ Object
remarks: This relationship is completely application defined and maintained. HealthVault does nothing to ensure that related things exist or have a relationship back to this thing. An example usage for related-things are to use an annotation thing instance to make medical annotations for another thing type or to relate a file instance (like an MRI) to problem instance. returns: a HealthVault::WCData::Thing::RelatedThing Array
88 89 90 |
# File 'lib/wc_data/generated/thing/common.rb', line 88 def return @children['related-thing'][:value] end |
#remove_extension(value) ⇒ Object
value is a #HealthVault::WCData::Thing::Extension
62 63 64 |
# File 'lib/wc_data/generated/thing/common.rb', line 62 def remove_extension(value) @children['extension'][:value].delete(value) end |
#remove_related_thing(value) ⇒ Object
value is a #HealthVault::WCData::Thing::RelatedThing
80 81 82 |
# File 'lib/wc_data/generated/thing/common.rb', line 80 def (value) @children['related-thing'][:value].delete(value) end |
#source ⇒ Object
returns: a String
24 25 26 |
# File 'lib/wc_data/generated/thing/common.rb', line 24 def source return @children['source'][:value] end |
#source=(value) ⇒ Object
value is a String
19 20 21 |
# File 'lib/wc_data/generated/thing/common.rb', line 19 def source=(value) @children['source'][:value] = value end |
#tags ⇒ Object
returns: a HealthVault::WCData::Types::String512
50 51 52 |
# File 'lib/wc_data/generated/thing/common.rb', line 50 def return @children['tags'][:value] end |
#tags=(value) ⇒ Object
value is a HealthVault::WCData::Types::String512
45 46 47 |
# File 'lib/wc_data/generated/thing/common.rb', line 45 def (value) @children['tags'][:value] = value end |