Class: OpenEHR::RM::DataTypes::Encapsulated::DvMultimedia
- Inherits:
-
DvEncapsulated
- Object
- Basic::DataValue
- DvEncapsulated
- OpenEHR::RM::DataTypes::Encapsulated::DvMultimedia
- Defined in:
- lib/openehr/rm/data_types/encapsulated.rb
Overview
Constant Summary
Constants inherited from DvEncapsulated
OpenEHR::RM::DataTypes::Encapsulated::DvEncapsulated::CHARSET_LIST_PATH
Constants included from Support::Definition::BasicDefinition
Support::Definition::BasicDefinition::CR, Support::Definition::BasicDefinition::LF
Instance Attribute Summary collapse
-
#alternate_text ⇒ Object
Returns the value of attribute alternate_text.
-
#compression_algorithm ⇒ Object
Returns the value of attribute compression_algorithm.
-
#data ⇒ Object
Returns the value of attribute data.
-
#integrity_check ⇒ Object
Returns the value of attribute integrity_check.
-
#integrity_check_algorithm ⇒ Object
Returns the value of attribute integrity_check_algorithm.
-
#media_type ⇒ Object
Returns the value of attribute media_type.
-
#thumbnail ⇒ Object
Returns the value of attribute thumbnail.
-
#uri ⇒ Object
Returns the value of attribute uri.
Attributes inherited from DvEncapsulated
Attributes inherited from Basic::DataValue
Instance Method Summary collapse
- #has_integrity_check? ⇒ Boolean
-
#initialize(args = {}) ⇒ DvMultimedia
constructor
A new instance of DvMultimedia.
- #is_compressed? ⇒ Boolean
- #is_external? ⇒ Boolean
- #is_inline? ⇒ Boolean
-
#size ⇒ Object
size is Integer [1..1] since RM 1.1.0 (size in bytes of the raw data content).
- #size=(size) ⇒ Object
Methods inherited from Basic::DataValue
Constructor Details
#initialize(args = {}) ⇒ DvMultimedia
Returns a new instance of DvMultimedia.
65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/openehr/rm/data_types/encapsulated.rb', line 65 def initialize(args = {}) super(args) self.media_type = args[:media_type] self.size = args[:size] self.uri = args[:uri] self.data = args[:data] self.compression_algorithm = args[:compression_algorithm] self.integrity_check = args[:integrity_check] self.integrity_check_algorithm = args[:integrity_check_algorithm] self.alternate_text = args[:alternate_text] self.thumbnail = args[:thumbnail] end |
Instance Attribute Details
#alternate_text ⇒ Object
Returns the value of attribute alternate_text.
61 62 63 |
# File 'lib/openehr/rm/data_types/encapsulated.rb', line 61 def alternate_text @alternate_text end |
#compression_algorithm ⇒ Object
Returns the value of attribute compression_algorithm.
61 62 63 |
# File 'lib/openehr/rm/data_types/encapsulated.rb', line 61 def compression_algorithm @compression_algorithm end |
#data ⇒ Object
Returns the value of attribute data.
61 62 63 |
# File 'lib/openehr/rm/data_types/encapsulated.rb', line 61 def data @data end |
#integrity_check ⇒ Object
Returns the value of attribute integrity_check.
61 62 63 |
# File 'lib/openehr/rm/data_types/encapsulated.rb', line 61 def integrity_check @integrity_check end |
#integrity_check_algorithm ⇒ Object
Returns the value of attribute integrity_check_algorithm.
61 62 63 |
# File 'lib/openehr/rm/data_types/encapsulated.rb', line 61 def integrity_check_algorithm @integrity_check_algorithm end |
#media_type ⇒ Object
Returns the value of attribute media_type.
60 61 62 |
# File 'lib/openehr/rm/data_types/encapsulated.rb', line 60 def media_type @media_type end |
#thumbnail ⇒ Object
Returns the value of attribute thumbnail.
61 62 63 |
# File 'lib/openehr/rm/data_types/encapsulated.rb', line 61 def thumbnail @thumbnail end |
#uri ⇒ Object
Returns the value of attribute uri.
61 62 63 |
# File 'lib/openehr/rm/data_types/encapsulated.rb', line 61 def uri @uri end |
Instance Method Details
#has_integrity_check? ⇒ Boolean
112 113 114 |
# File 'lib/openehr/rm/data_types/encapsulated.rb', line 112 def has_integrity_check? !@integrity_check_algorithm.nil? end |
#is_compressed? ⇒ Boolean
108 109 110 |
# File 'lib/openehr/rm/data_types/encapsulated.rb', line 108 def is_compressed? !@compression_algorithm.nil? end |
#is_external? ⇒ Boolean
100 101 102 |
# File 'lib/openehr/rm/data_types/encapsulated.rb', line 100 def is_external? !@uri.nil? end |
#is_inline? ⇒ Boolean
104 105 106 |
# File 'lib/openehr/rm/data_types/encapsulated.rb', line 104 def is_inline? !@data.nil? end |
#size ⇒ Object
size is Integer [1..1] since RM 1.1.0 (size in bytes of the raw data content). Left unset (nil), it falls back to the inherited DvEncapsulated#size (@value.size) for backward compatibility.
88 89 90 |
# File 'lib/openehr/rm/data_types/encapsulated.rb', line 88 def size @size.nil? ? super : @size end |
#size=(size) ⇒ Object
92 93 94 95 96 97 98 |
# File 'lib/openehr/rm/data_types/encapsulated.rb', line 92 def size=(size) unless size.nil? raise ArgumentError, 'size must be an Integer' unless size.is_a?(Integer) raise ArgumentError, 'size must not be negative' if size.negative? end @size = size end |