Class: VORuby::STC::V1_30::SpectralFrameType

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

Overview

Contains the spectral frame reference position.

Direct Known Subclasses

SpectralFrame

Instance Attribute Summary collapse

Attributes inherited from CoordFrameType

#name

Attributes included from STCReference

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

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from CoordFrameType

coord_frame_from_xml

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(reference_position, name = nil, options = {}) ⇒ SpectralFrameType

Returns a new instance of SpectralFrameType.



7800
7801
7802
7803
# File 'lib/voruby/stc/1.30/stc.rb', line 7800

def initialize(reference_position, name=nil, options={})
  super(name, options)
  self.reference_position = reference_position
end

Instance Attribute Details

#reference_positionObject

Returns the value of attribute reference_position.



7798
7799
7800
# File 'lib/voruby/stc/1.30/stc.rb', line 7798

def reference_position
  @reference_position
end

Class Method Details

.from_xml(xml) ⇒ Object



7826
7827
7828
7829
7830
7831
7832
7833
# File 'lib/voruby/stc/1.30/stc.rb', line 7826

def self.from_xml(xml)
  root = element_from(xml)
  
  self.new(
    xml_to_obj(root, ReferencePosition, true),
    *CoordFrameType.coord_frame_from_xml(root)
  )
end

Instance Method Details

#==(f) ⇒ Object



7812
7813
7814
7815
# File 'lib/voruby/stc/1.30/stc.rb', line 7812

def ==(f)
  super(f) and
  self.reference_position == f.reference_position
end

#to_xml(name = nil) ⇒ Object



7817
7818
7819
7820
7821
7822
7823
7824
# File 'lib/voruby/stc/1.30/stc.rb', line 7817

def to_xml(name=nil)
  el = super(name)
  
  el.add_element(self.reference_position.to_xml)
  
  collapse_namespaces(el)
  el
end