Class: VORuby::ADQL::V1_0::SubQuerySet
- Inherits:
-
InclusionSet
- Object
- InclusionSet
- VORuby::ADQL::V1_0::SubQuerySet
- Defined in:
- lib/voruby/adql/1.0/adql.rb
Overview
Represents the subquery in a SQL IN expression
Instance Attribute Summary collapse
-
#selection ⇒ Object
Returns the value of attribute selection.
Class Method Summary collapse
Instance Method Summary collapse
- #==(s) ⇒ Object
-
#initialize(selection) ⇒ SubQuerySet
constructor
A new instance of SubQuerySet.
- #to_s ⇒ Object
- #to_xml(name = nil) ⇒ Object
Methods included from SerializableToXml
Constructor Details
#initialize(selection) ⇒ SubQuerySet
Returns a new instance of SubQuerySet.
2111 2112 2113 |
# File 'lib/voruby/adql/1.0/adql.rb', line 2111 def initialize(selection) self.selection = selection end |
Instance Attribute Details
#selection ⇒ Object
Returns the value of attribute selection.
2107 2108 2109 |
# File 'lib/voruby/adql/1.0/adql.rb', line 2107 def selection @selection end |
Class Method Details
.from_xml(xml) ⇒ Object
2138 2139 2140 2141 2142 |
# File 'lib/voruby/adql/1.0/adql.rb', line 2138 def self.from_xml(xml) root = element_from(xml) self.new(xml_to_obj(REXML::XPath.first(root, 'x:selection', {'x' => obj_ns.uri}))) end |
.xml_type ⇒ Object
2109 |
# File 'lib/voruby/adql/1.0/adql.rb', line 2109 def self.xml_type; 'subQuerySet' end |
Instance Method Details
#==(s) ⇒ Object
2121 2122 2123 |
# File 'lib/voruby/adql/1.0/adql.rb', line 2121 def ==(s) self.selection == s.selection end |
#to_s ⇒ Object
2125 2126 2127 |
# File 'lib/voruby/adql/1.0/adql.rb', line 2125 def to_s "(#{self.selection})" end |
#to_xml(name = nil) ⇒ Object
2129 2130 2131 2132 2133 2134 2135 2136 |
# File 'lib/voruby/adql/1.0/adql.rb', line 2129 def to_xml(name=nil) el = super(name) el.add_element(self.selection.to_xml('selection')) collapse_namespaces(el) el end |