Class: VORuby::STC::V1_30::VelocityIntervalType

Inherits:
SpatialIntervalType show all
Defined in:
lib/voruby/stc/1.30/stc.rb

Overview

Contains a spatial velocity CoordInterval.

Instance Attribute Summary collapse

Attributes inherited from SpatialIntervalType

#epoch, #unit

Attributes inherited from CoordIntervalType

#fill_factor, #frame_id, #hi_include, #lo_include

Attributes included from STCReference

#id, #idref, #ucd, #xlink_href, #xlink_type

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from SpatialIntervalType

spatial_interval_from_xml

Methods inherited from CoordIntervalType

coord_interval_from_xml, #hi_include?, #lo_include?

Methods inherited from STCBaseType

stc_base_from_xml

Methods included from STCReference

#stc_reference_eq, stc_reference_from_xml, #stc_reference_to_xml

Methods included from SerializableToXml

#element

Constructor Details

#initialize(vel_time_unit, lo_include = true, hi_include = true, options = {}) ⇒ VelocityIntervalType

Returns a new instance of VelocityIntervalType.



4361
4362
4363
4364
# File 'lib/voruby/stc/1.30/stc.rb', line 4361

def initialize(vel_time_unit, lo_include=true, hi_include=true, options={})
  self.vel_time_unit = vel_time_unit
  super(lo_include, hi_include, options)
end

Instance Attribute Details

#vel_time_unitObject

Returns the value of attribute vel_time_unit.



4359
4360
4361
# File 'lib/voruby/stc/1.30/stc.rb', line 4359

def vel_time_unit
  @vel_time_unit
end

Class Method Details

.from_xml(xml) ⇒ Object



4393
4394
4395
4396
# File 'lib/voruby/stc/1.30/stc.rb', line 4393

def self.from_xml(xml)
  root = element_from(xml)
  self.new(*velocity_interval_from_xml(root))
end

.velocity_interval_from_xml(root) ⇒ Object



4386
4387
4388
4389
4390
4391
# File 'lib/voruby/stc/1.30/stc.rb', line 4386

def self.velocity_interval_from_xml(root)
  [
    VelTimeUnitType.new(root.attributes.get_attribute_ns(obj_ns.uri, 'vel_time_unit').value),
    *SpatialIntervalType.spatial_interval_from_xml(root)
  ]
end

Instance Method Details

#==(i) ⇒ Object



4375
4376
4377
4378
# File 'lib/voruby/stc/1.30/stc.rb', line 4375

def ==(i)
  super(i) and 
  self.vel_time_unit == i.vel_time_unit
end

#to_xml(name = nil) ⇒ Object



4380
4381
4382
4383
4384
# File 'lib/voruby/stc/1.30/stc.rb', line 4380

def to_xml(name=nil)
  el = super(name)
  el.attributes["#{obj_ns.prefix}:vel_time_unit"] = self.vel_time_unit.to_s
  el
end