Class: VORuby::STC::V1_30::PosVector1CoordinateType
- Inherits:
-
BasicCoordinateType
- Object
- STCBaseType
- CoordinateType
- BasicCoordinateType
- VORuby::STC::V1_30::PosVector1CoordinateType
- Defined in:
- lib/voruby/stc/1.30/stc.rb
Overview
Position scalar coordinate type; sibling of BasicCoordinateType. Single Error, Resolution, Size, PixSize elements indicate definite values; pairs indicate ranges.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#coord_system_id ⇒ Object
Returns the value of attribute coord_system_id.
-
#unit ⇒ Object
Returns the value of attribute unit.
Attributes inherited from BasicCoordinateType
#error, #pix_size, #resolution, #size, #value
Attributes inherited from CoordinateType
Attributes included from STCReference
#id, #idref, #ucd, #xlink_href, #xlink_type
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from BasicCoordinateType
Methods inherited from CoordinateType
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
Constructor Details
This class inherits a constructor from VORuby::STC::V1_30::STCBaseType
Instance Attribute Details
#coord_system_id ⇒ Object
Returns the value of attribute coord_system_id.
2580 2581 2582 |
# File 'lib/voruby/stc/1.30/stc.rb', line 2580 def coord_system_id @coord_system_id end |
#unit ⇒ Object
Returns the value of attribute unit.
2580 2581 2582 |
# File 'lib/voruby/stc/1.30/stc.rb', line 2580 def unit @unit end |
Class Method Details
.from_xml(xml) ⇒ Object
2625 2626 2627 2628 |
# File 'lib/voruby/stc/1.30/stc.rb', line 2625 def self.from_xml(xml) root = element_from(xml) self.new(pos_vector1_coordinate_from_xml(root)) end |
.pos_vector1_coordinate_from_xml(root) ⇒ Object
2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 |
# File 'lib/voruby/stc/1.30/stc.rb', line 2613 def self.pos_vector1_coordinate_from_xml(root) = BasicCoordinateType.basic_coordinate_from_xml(root) cis = root.attributes.get_attribute_ns(obj_ns.uri, 'coord_system_id') [:coord_system_id] = IdRef.new(cis.value) if cis unit = root.attributes.get_attribute_ns(obj_ns.uri, 'unit') [:unit] = PosUnitType.new(unit.value) if unit end |
Instance Method Details
#==(c) ⇒ Object
2598 2599 2600 2601 2602 |
# File 'lib/voruby/stc/1.30/stc.rb', line 2598 def ==(c) super(c) and self.coord_system_id == c.coord_system_id and self.unit == c.unit end |
#to_xml(name = nil) ⇒ Object
2604 2605 2606 2607 2608 2609 2610 2611 |
# File 'lib/voruby/stc/1.30/stc.rb', line 2604 def to_xml(name=nil) el = super(name) el.attributes["#{obj_ns.prefix}:coord_system_id"] = self.coord_system_id.to_s if self.coord_system_id el.attributes["#{obj_ns.prefix}:unit"] = self.unit.to_s if self.unit el end |