Class: VORuby::STC::V1_10::STC::StcDescription
- Inherits:
-
StcMetadataType
- Object
- StcMetadataType
- VORuby::STC::V1_10::STC::StcDescription
- Defined in:
- lib/voruby/stc/1.10/stc.rb
Overview
Generalized single stcMetadata type
Direct Known Subclasses
CatalogEntryLocationType, ObservationLocation, ObservatoryLocation, PixelSpace, SearchLocationType, StcResourceProfileType
Defined Under Namespace
Classes: CoordSysList
Instance Attribute Summary collapse
-
#coord_areas ⇒ Object
Returns the value of attribute coord_areas.
-
#coord_sys ⇒ Object
Returns the value of attribute coord_sys.
-
#coords ⇒ Object
Returns the value of attribute coords.
Attributes inherited from StcMetadataType
Instance Method Summary collapse
- #==(d) ⇒ Object
-
#initialize(options = {}) ⇒ StcDescription
constructor
A new instance of StcDescription.
- #to_xml(name = nil) ⇒ Object
Methods included from SerializableToXml
Constructor Details
#initialize(options = {}) ⇒ StcDescription
Returns a new instance of StcDescription.
2821 2822 2823 2824 |
# File 'lib/voruby/stc/1.10/stc.rb', line 2821 def initialize(={}) raise_argument_required_error('list of coordinate systems') if !.has_key?(:coord_sys) super() end |
Instance Attribute Details
#coord_areas ⇒ Object
Returns the value of attribute coord_areas.
2814 2815 2816 |
# File 'lib/voruby/stc/1.10/stc.rb', line 2814 def coord_areas @coord_areas end |
#coord_sys ⇒ Object
Returns the value of attribute coord_sys.
2814 2815 2816 |
# File 'lib/voruby/stc/1.10/stc.rb', line 2814 def coord_sys @coord_sys end |
#coords ⇒ Object
Returns the value of attribute coords.
2814 2815 2816 |
# File 'lib/voruby/stc/1.10/stc.rb', line 2814 def coords @coords end |
Instance Method Details
#==(d) ⇒ Object
2847 2848 2849 2850 2851 2852 |
# File 'lib/voruby/stc/1.10/stc.rb', line 2847 def ==(d) super(d) and self.coord_sys == d.coord_sys and self.coords == d.coords and self.coord_areas == d.coord_areas end |
#to_xml(name = nil) ⇒ Object
2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 |
# File 'lib/voruby/stc/1.10/stc.rb', line 2854 def to_xml(name=nil) el = super(name) if self.coord_sys self.coord_sys.is_a?(Array) ? self.coord_sys.each { |s| el.add_element(s.to_xml) } : el.add_element(self.coord_sys.to_xml) end if self.coords self.coords.is_a?(Array) ? self.coords.each { |c| el.add_element(c.to_xml) } : el.add_element(self.coords.to_xml) end if self.coord_areas self.coord_areas.is_a?(Array) ? self.coord_areas.each { |a| el.add_element(a.to_xml) } : el.add_element(self.coord_areas.to_xml) end collapse_namespaces(el) el end |