Class: VORuby::STC::V1_30::NegationType
- Inherits:
-
RegionType
- Object
- STCBaseType
- CoordIntervalType
- SpatialIntervalType
- RegionType
- VORuby::STC::V1_30::NegationType
- Defined in:
- lib/voruby/stc/1.30/stc.rb
Overview
The negation of a region is a region.
Instance Attribute Summary collapse
-
#region ⇒ Object
Returns the value of attribute region.
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
- #==(n) ⇒ Object
-
#initialize(region, area = nil, lo_include = true, hi_include = true, options = {}) ⇒ NegationType
constructor
A new instance of NegationType.
- #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(region, area = nil, lo_include = true, hi_include = true, options = {}) ⇒ NegationType
Returns a new instance of NegationType.
6017 6018 6019 6020 |
# File 'lib/voruby/stc/1.30/stc.rb', line 6017 def initialize(region, area=nil, lo_include=true, hi_include=true, ={}) super(area, lo_include, hi_include, ) self.region = region end |
Instance Attribute Details
#region ⇒ Object
Returns the value of attribute region.
6015 6016 6017 |
# File 'lib/voruby/stc/1.30/stc.rb', line 6015 def region @region end |
Class Method Details
.from_xml(xml) ⇒ Object
6044 6045 6046 6047 6048 6049 6050 6051 |
# File 'lib/voruby/stc/1.30/stc.rb', line 6044 def self.from_xml(xml) root = element_from(xml) self.new( xml_to_obj(root, Region, true), *RegionType.region_from_xml(root) ) end |
Instance Method Details
#==(n) ⇒ Object
6028 6029 6030 6031 |
# File 'lib/voruby/stc/1.30/stc.rb', line 6028 def ==(n) super(n) and self.region == n.region end |
#to_s ⇒ Object
6040 6041 6042 |
# File 'lib/voruby/stc/1.30/stc.rb', line 6040 def to_s "NOT(#{self.region})" end |
#to_xml(name = nil) ⇒ Object
6033 6034 6035 6036 6037 6038 |
# File 'lib/voruby/stc/1.30/stc.rb', line 6033 def to_xml(name=nil) el = super(name) el.add_element(self.region.to_xml) collapse_namespaces(el) el end |