Class: VORuby::ADQL::V1_0::XMatchTableAlias

Inherits:
Object
  • Object
show all
Includes:
SerializableToXml
Defined in:
lib/voruby/adql/1.0/adql.rb

Overview

The base type for all table inclusion or drop types used in a cross match expression

Direct Known Subclasses

DropTable, IncludeTable

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from SerializableToXml

#element

Constructor Details

#initialize(name) ⇒ XMatchTableAlias

Returns a new instance of XMatchTableAlias.



984
985
986
# File 'lib/voruby/adql/1.0/adql.rb', line 984

def initialize(name)
  self.name = name
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



982
983
984
# File 'lib/voruby/adql/1.0/adql.rb', line 982

def name
  @name
end

Class Method Details

.from_xml(xml = nil) ⇒ Object



1003
1004
1005
1006
# File 'lib/voruby/adql/1.0/adql.rb', line 1003

def self.from_xml(xml=nil)
  root = element_from(xml)
  self.new(root.attributes.get_attribute_ns(obj_ns.uri, 'Name'))
end

Instance Method Details

#==(t) ⇒ Object



993
994
995
# File 'lib/voruby/adql/1.0/adql.rb', line 993

def ==(t)
  self.name == t.name
end

#to_xml(name = nil) ⇒ Object



997
998
999
1000
1001
# File 'lib/voruby/adql/1.0/adql.rb', line 997

def to_xml(name=nil)
  el = element_root(name)
  el.attributes["#{obj_ns.prefix}:Name"] = self.name
  el
end