Class: VORuby::STC::V1_30::VelVector1CoordinateType

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

Overview

Velocity scalar coordinate type; sibling of basicCoordinateType. Single Error, Resolution, Size, PixSize elements indicate definite values; pairs indicate ranges.

Direct Known Subclasses

Velocity1D

Instance Attribute Summary collapse

Attributes inherited from PosVector1CoordinateType

#coord_system_id, #unit

Attributes inherited from BasicCoordinateType

#error, #pix_size, #resolution, #size, #value

Attributes inherited from CoordinateType

#frame_id, #name

Attributes included from STCReference

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

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from PosVector1CoordinateType

pos_vector1_coordinate_from_xml

Methods inherited from BasicCoordinateType

basic_coordinate_from_xml

Methods inherited from CoordinateType

coordinate_from_xml

Methods inherited from STCBaseType

#initialize, 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

This class inherits a constructor from VORuby::STC::V1_30::STCBaseType

Instance Attribute Details

#vel_time_unitObject

Returns the value of attribute vel_time_unit.



2742
2743
2744
# File 'lib/voruby/stc/1.30/stc.rb', line 2742

def vel_time_unit
  @vel_time_unit
end

Class Method Details

.from_xml(xml) ⇒ Object



2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
# File 'lib/voruby/stc/1.30/stc.rb', line 2762

def self.from_xml(xml)
  root = element_from(xml)
  
  options = PosVector1CoordinateType.pos_vector1_coordinate_from_xml(root)
  
  vtu = root.attributes.get_attribute_ns(obj_ns.uri, 'vel_time_unit')
  options[:vel_time_unit] = VelTimeUnitType.new(vtu.value) if vtu
  
  self.new(options)
end

Instance Method Details

#==(c) ⇒ Object



2752
2753
2754
# File 'lib/voruby/stc/1.30/stc.rb', line 2752

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

#to_xml(name = nil) ⇒ Object



2756
2757
2758
2759
2760
# File 'lib/voruby/stc/1.30/stc.rb', line 2756

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