class HQMF2::TemporalReference
Represents a time bounded reference. Wraps the “Range” class
Constants
- UPDATED_TYPES
Use updated mappings to HDS temporal reference types (as used in SimpleXML Parser) github.com/projecttacoma/simplexml_parser/blob/fa0f589d98059b88d77dc3cb465b62184df31671/lib/model/types.rb#L167
Attributes
range[R]
reference[R]
type[R]
Public Class Methods
new(entry)
click to toggle source
# File lib/hqmf-parser/2.0/types.rb, line 354 def initialize(entry) @entry = entry @type = UPDATED_TYPES[attr_val('./@typeCode')] || attr_val('./@typeCode') @reference = Reference.new(@entry.at_xpath('./*/cda:id', HQMF2::Document::NAMESPACES)) range_def = @entry.at_xpath('./qdm:temporalInformation/qdm:delta', HQMF2::Document::NAMESPACES) @range = HQMF2::Range.new(range_def, 'IVL_PQ') if range_def end
Public Instance Methods
to_model()
click to toggle source
Generates this classes hqmf-model equivalent
# File lib/hqmf-parser/2.0/types.rb, line 363 def to_model rm = range ? range.to_model : nil HQMF::TemporalReference.new(type, reference.to_model, rm) end