Class: VORuby::STC::V1_30::DiffType
- Inherits:
-
RegionType
- Object
- STCBaseType
- CoordIntervalType
- SpatialIntervalType
- RegionType
- VORuby::STC::V1_30::DiffType
- Defined in:
- lib/voruby/stc/1.30/stc.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#region1 ⇒ Object
Returns the value of attribute region1.
-
#region2 ⇒ Object
Returns the value of attribute region2.
Attributes inherited from RegionType
#area, #coord_system_id, #note
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
- #==(d) ⇒ Object
-
#initialize(region1, region2, area = nil, lo_include = true, hi_include = true, options = {}) ⇒ DiffType
constructor
A new instance of DiffType.
- #to_s ⇒ Object
- #to_xml(name = nil) ⇒ Object
Methods inherited from RegionType
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(region1, region2, area = nil, lo_include = true, hi_include = true, options = {}) ⇒ DiffType
Returns a new instance of DiffType.
6057 6058 6059 6060 6061 |
# File 'lib/voruby/stc/1.30/stc.rb', line 6057 def initialize(region1, region2, area=nil, lo_include=true, hi_include=true, ={}) super(area, lo_include, hi_include, ) self.region1 = region1 self.region2 = region2 end |
Instance Attribute Details
#region1 ⇒ Object
Returns the value of attribute region1.
6055 6056 6057 |
# File 'lib/voruby/stc/1.30/stc.rb', line 6055 def region1 @region1 end |
#region2 ⇒ Object
Returns the value of attribute region2.
6055 6056 6057 |
# File 'lib/voruby/stc/1.30/stc.rb', line 6055 def region2 @region2 end |
Class Method Details
.from_xml(xml) ⇒ Object
6095 6096 6097 6098 6099 6100 6101 6102 6103 |
# File 'lib/voruby/stc/1.30/stc.rb', line 6095 def self.from_xml(xml) root = element_from(xml) self.new( xml_to_obj(root, Region, true), xml_to_obj(root, Region2, true), *RegionType.region_from_xml(root) ) end |
Instance Method Details
#==(d) ⇒ Object
6075 6076 6077 6078 6079 |
# File 'lib/voruby/stc/1.30/stc.rb', line 6075 def ==(d) super(d) and self.region1 == d.region1 and self.region2 == d.region2 end |
#to_s ⇒ Object
6091 6092 6093 |
# File 'lib/voruby/stc/1.30/stc.rb', line 6091 def to_s "DIFFERENCE(#{self.region1} #{self.region2})" end |
#to_xml(name = nil) ⇒ Object
6081 6082 6083 6084 6085 6086 6087 6088 6089 |
# File 'lib/voruby/stc/1.30/stc.rb', line 6081 def to_xml(name=nil) el = super(name) el.add_element(self.region1.to_xml) el.add_element(self.region2.to_xml) collapse_namespaces(el) el end |