Class: VORuby::ADQL::InverseSearch

Inherits:
Search show all
Defined in:
lib/voruby/adql/adql.rb,
lib/voruby/adql/transforms.rb

Overview

Represents expressions like Not A.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(condition) ⇒ InverseSearch

Returns a new instance of InverseSearch.



1945
1946
1947
# File 'lib/voruby/adql/adql.rb', line 1945

def initialize(condition)
 self.condition = condition
end

Instance Attribute Details

#conditionObject

Returns the value of attribute condition.



1943
1944
1945
# File 'lib/voruby/adql/adql.rb', line 1943

def condition
  @condition
end

Class Method Details

.from_xml(node) ⇒ Object



1958
1959
1960
1961
1962
# File 'lib/voruby/adql/adql.rb', line 1958

def self.from_xml(node)
  cond_node = REXML::XPath.first(node, 'Condition')
  cond = Condition.from_xml(cond_node)
  return InverseSearch.new(cond)
end

Instance Method Details

#to_adqlsObject



373
374
375
# File 'lib/voruby/adql/transforms.rb', line 373

def to_adqls
 "NOT #{self.condition.to_adqls}"
end

#to_sObject



1954
1955
1956
# File 'lib/voruby/adql/adql.rb', line 1954

def to_s
  "{condition=#{self.condition}}"
end