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.



1991
1992
1993
# File 'lib/voruby/adql/adql.rb', line 1991

def initialize(condition)
 self.condition = condition
end

Instance Attribute Details

#conditionObject

Returns the value of attribute condition.



1989
1990
1991
# File 'lib/voruby/adql/adql.rb', line 1989

def condition
  @condition
end

Class Method Details

.from_xml(node) ⇒ Object



2004
2005
2006
2007
2008
# File 'lib/voruby/adql/adql.rb', line 2004

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



2000
2001
2002
# File 'lib/voruby/adql/adql.rb', line 2000

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