Class: VORuby::STC::V1_30::CoordScalarIntervalType
- Inherits:
-
CoordIntervalType
- Object
- STCBaseType
- CoordIntervalType
- VORuby::STC::V1_30::CoordScalarIntervalType
- Defined in:
- lib/voruby/stc/1.30/stc.rb
Overview
Scalar coordinate interval type.
Direct Known Subclasses
PixelCoordScalarInterval, RedshiftIntervalType, SpectralIntervalType
Instance Attribute Summary collapse
-
#hi_limit ⇒ Object
Returns the value of attribute hi_limit.
-
#lo_limit ⇒ Object
Returns the value of attribute lo_limit.
Attributes inherited from CoordIntervalType
#fill_factor, #frame_id, #hi_include, #lo_include
Attributes included from STCReference
#id, #idref, #ucd, #xlink_href, #xlink_type
Class Method Summary collapse
Instance Method Summary collapse
- #==(i) ⇒ Object
-
#initialize(lo_limit, hi_limit, lo_include = true, hi_include = true, options = {}) ⇒ CoordScalarIntervalType
constructor
A new instance of CoordScalarIntervalType.
- #to_xml(name = nil) ⇒ Object
Methods inherited from CoordIntervalType
coord_interval_from_xml, #hi_include?, #lo_include?
Methods inherited from STCBaseType
Methods included from STCReference
#stc_reference_eq, stc_reference_from_xml, #stc_reference_to_xml
Methods included from SerializableToXml
Constructor Details
#initialize(lo_limit, hi_limit, lo_include = true, hi_include = true, options = {}) ⇒ CoordScalarIntervalType
Returns a new instance of CoordScalarIntervalType.
3787 3788 3789 3790 3791 |
# File 'lib/voruby/stc/1.30/stc.rb', line 3787 def initialize(lo_limit, hi_limit, lo_include=true, hi_include=true, ={}) self.lo_limit = lo_limit self.hi_limit = hi_limit super(lo_include, hi_include, ) end |
Instance Attribute Details
#hi_limit ⇒ Object
Returns the value of attribute hi_limit.
3785 3786 3787 |
# File 'lib/voruby/stc/1.30/stc.rb', line 3785 def hi_limit @hi_limit end |
#lo_limit ⇒ Object
Returns the value of attribute lo_limit.
3785 3786 3787 |
# File 'lib/voruby/stc/1.30/stc.rb', line 3785 def lo_limit @lo_limit end |
Class Method Details
.coord_scalar_interval_from_xml(root) ⇒ Object
3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 |
# File 'lib/voruby/stc/1.30/stc.rb', line 3827 def self.coord_scalar_interval_from_xml(root) lo_limit = REXML::XPath.first(root, 'x:LoLimit', {'x' => obj_ns.uri}) hi_limit = REXML::XPath.first(root, 'x:HiLimit', {'x' => obj_ns.uri}) [ lo_limit ? Double1Type.from_xml(lo_limit) : nil, hi_limit ? Double1Type.from_xml(hi_limit) : nil, *CoordIntervalType.coord_interval_from_xml(root) ] end |
.from_xml(xml) ⇒ Object
3838 3839 3840 3841 |
# File 'lib/voruby/stc/1.30/stc.rb', line 3838 def self.from_xml(xml) root = element_from(xml) self.new(*coord_scalar_interval_from_xml(root)) end |
Instance Method Details
#==(i) ⇒ Object
3811 3812 3813 3814 3815 |
# File 'lib/voruby/stc/1.30/stc.rb', line 3811 def ==(i) super(i) and self.lo_limit == i.lo_limit and self.hi_limit == i.hi_limit end |
#to_xml(name = nil) ⇒ Object
3817 3818 3819 3820 3821 3822 3823 3824 3825 |
# File 'lib/voruby/stc/1.30/stc.rb', line 3817 def to_xml(name=nil) el = super(name) el.add_element(self.lo_limit.to_xml('LoLimit')) if self.lo_limit el.add_element(self.hi_limit.to_xml('HiLimit')) if self.hi_limit collapse_namespaces(el) el end |