Class: VORuby::ADQL::V1_0::InverseSearch
- Defined in:
- lib/voruby/adql/1.0/adql.rb
Overview
Represents expressions like Not A
Instance Attribute Summary collapse
-
#condition ⇒ Object
Returns the value of attribute condition.
Class Method Summary collapse
Instance Method Summary collapse
- #==(p) ⇒ Object
-
#initialize(condition) ⇒ InverseSearch
constructor
A new instance of InverseSearch.
- #to_s ⇒ Object
- #to_xml(name = nil) ⇒ Object
Methods included from SerializableToXml
Constructor Details
#initialize(condition) ⇒ InverseSearch
Returns a new instance of InverseSearch.
1468 1469 1470 |
# File 'lib/voruby/adql/1.0/adql.rb', line 1468 def initialize(condition) self.condition = condition end |
Instance Attribute Details
#condition ⇒ Object
Returns the value of attribute condition.
1464 1465 1466 |
# File 'lib/voruby/adql/1.0/adql.rb', line 1464 def condition @condition end |
Class Method Details
.from_xml(xml) ⇒ Object
1493 1494 1495 1496 1497 |
# File 'lib/voruby/adql/1.0/adql.rb', line 1493 def self.from_xml(xml) root = element_from(xml) self.new(xml_to_obj(REXML::XPath.first(root, 'x:Condition', {'x' => obj_ns.uri}))) end |
.xml_type ⇒ Object
1466 |
# File 'lib/voruby/adql/1.0/adql.rb', line 1466 def self.xml_type; 'inverseSearchType' end |
Instance Method Details
#==(p) ⇒ Object
1478 1479 1480 |
# File 'lib/voruby/adql/1.0/adql.rb', line 1478 def ==(p) self.condition == p.condition end |
#to_s ⇒ Object
1482 1483 1484 |
# File 'lib/voruby/adql/1.0/adql.rb', line 1482 def to_s "NOT #{condition}" end |
#to_xml(name = nil) ⇒ Object
1486 1487 1488 1489 1490 1491 |
# File 'lib/voruby/adql/1.0/adql.rb', line 1486 def to_xml(name=nil) el = super(name) el.add_element(self.condition.to_xml('Condition')) collapse_namespaces(el) el end |