Class: VORuby::STC::V1_30::Pos2VecIntervalType
- Inherits:
-
SpatialIntervalType
- Object
- STCBaseType
- CoordIntervalType
- SpatialIntervalType
- VORuby::STC::V1_30::Pos2VecIntervalType
- Defined in:
- lib/voruby/stc/1.30/stc.rb
Overview
2-D coordinate interval type.
Direct Known Subclasses
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 SpatialIntervalType
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 = {}) ⇒ Pos2VecIntervalType
constructor
A new instance of Pos2VecIntervalType.
- #to_xml(name = nil) ⇒ Object
Methods inherited from SpatialIntervalType
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 = {}) ⇒ Pos2VecIntervalType
Returns a new instance of Pos2VecIntervalType.
4257 4258 4259 4260 4261 |
# File 'lib/voruby/stc/1.30/stc.rb', line 4257 def initialize(lo_limit, hi_limit, lo_include=true, hi_include=true, ={}) super(lo_include, hi_include, ) self.lo_limit = lo_limit self.hi_limit = hi_limit end |
Instance Attribute Details
#hi_limit ⇒ Object
Returns the value of attribute hi_limit.
4255 4256 4257 |
# File 'lib/voruby/stc/1.30/stc.rb', line 4255 def hi_limit @hi_limit end |
#lo_limit ⇒ Object
Returns the value of attribute lo_limit.
4255 4256 4257 |
# File 'lib/voruby/stc/1.30/stc.rb', line 4255 def lo_limit @lo_limit end |
Class Method Details
.from_xml(xml) ⇒ Object
4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 |
# File 'lib/voruby/stc/1.30/stc.rb', line 4291 def self.from_xml(xml) root = element_from(xml) lo_limit = REXML::XPath.first(root, 'x:LoLimit2Vec', {'x' => obj_ns.uri}) hi_limit = REXML::XPath.first(root, 'x:HiLimit2Vec', {'x' => obj_ns.uri}) self.new( lo_limit ? Double2Type.from_xml(lo_limit) : nil, hi_limit ? Double2Type.from_xml(hi_limit) : nil, *SpatialIntervalType.spatial_interval_from_xml(root) ) end |
Instance Method Details
#==(i) ⇒ Object
4275 4276 4277 4278 4279 |
# File 'lib/voruby/stc/1.30/stc.rb', line 4275 def ==(i) super(i) and self.lo_limit == i.lo_limit and self.hi_limit == i.hi_limit end |
#to_xml(name = nil) ⇒ Object
4281 4282 4283 4284 4285 4286 4287 4288 4289 |
# File 'lib/voruby/stc/1.30/stc.rb', line 4281 def to_xml(name=nil) el = super(name) el.add_element(self.lo_limit.to_xml('LoLimit2Vec')) if self.lo_limit el.add_element(self.hi_limit.to_xml('HiLimit2Vec')) if self.hi_limit collapse_namespaces(el) el end |