Class: VORuby::STC::V1_10::STC::SearchLocationType
- Inherits:
-
StcDescription
- Object
- StcMetadataType
- StcDescription
- VORuby::STC::V1_10::STC::SearchLocationType
- Defined in:
- lib/voruby/stc/1.10/stc.rb
Overview
Type for STC search location
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from StcDescription
#coord_areas, #coord_sys, #coords
Attributes inherited from StcMetadataType
Class Method Summary collapse
Instance Method Summary collapse
- #coord_areas=(a) ⇒ Object
- #coord_sys=(ss) ⇒ Object
- #coords=(c) ⇒ Object
-
#initialize(options = {}) ⇒ SearchLocationType
constructor
A new instance of SearchLocationType.
Methods inherited from StcDescription
Methods inherited from StcMetadataType
Methods included from SerializableToXml
Constructor Details
#initialize(options = {}) ⇒ SearchLocationType
Returns a new instance of SearchLocationType.
2934 2935 2936 2937 2938 |
# File 'lib/voruby/stc/1.10/stc.rb', line 2934 def initialize(={}) raise_argument_required_error('astro coordinate systems') if !.has_key?(:coord_sys) raise_argument_required_error('astro coordinate area') if !.has_key?(:coord_areas) super() end |
Class Method Details
.from_xml(xml) ⇒ Object
2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 |
# File 'lib/voruby/stc/1.10/stc.rb', line 2960 def self.from_xml(xml) root = element_from(xml) = { :coord_sys => xml_to_obj(root, AstroCoordSystem), :coords => xml_to_obj(root, AstroCoords, true, Coords), :coord_areas => xml_to_obj(root, AstroCoordArea, true) } id = root.attributes.get_attribute_ns(obj_ns.uri, 'ID') [:id] = Id.new(id.value) if id self.new() end |
Instance Method Details
#coord_areas=(a) ⇒ Object
2954 2955 2956 2957 2958 |
# File 'lib/voruby/stc/1.10/stc.rb', line 2954 def coord_areas=(a) raise_argument_required_error('astro coordinate area') if !a raise_type_mismatch_error(a, AstroCoordArea) @coord_areas = a end |
#coord_sys=(ss) ⇒ Object
2940 2941 2942 2943 2944 2945 2946 2947 |
# File 'lib/voruby/stc/1.10/stc.rb', line 2940 def coord_sys=(ss) aise_argument_required_error('astro coordinate systems') if !ss ss = AstroCoordSystemList.new(ss) if ss.class == Array raise_type_mismatch_error(ss, AstroCoordSystemList) @coord_sys = ss end |
#coords=(c) ⇒ Object
2949 2950 2951 2952 |
# File 'lib/voruby/stc/1.10/stc.rb', line 2949 def coords=(c) raise_type_mismatch_error(c, AstroCoords) if c @coords = c end |