Class: VORuby::ADQL::Table
- Defined in:
- lib/voruby/adql/adql.rb,
lib/voruby/adql/transforms.rb
Overview
Represents a table with its name and its alias name.
Instance Attribute Summary collapse
-
#alias_name ⇒ Object
Returns the value of attribute alias_name.
-
#name ⇒ Object
Returns the value of attribute name.
-
#xpath_name ⇒ Object
Returns the value of attribute xpath_name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name, alias_name = nil, xpath_name = nil) ⇒ Table
constructor
A new instance of Table.
- #to_adqls ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(name, alias_name = nil, xpath_name = nil) ⇒ Table
Returns a new instance of Table.
837 838 839 840 841 |
# File 'lib/voruby/adql/adql.rb', line 837 def initialize(name, alias_name=nil, xpath_name=nil) self.name = name self.alias_name = alias_name self.xpath_name = xpath_name end |
Instance Attribute Details
#alias_name ⇒ Object
Returns the value of attribute alias_name.
835 836 837 |
# File 'lib/voruby/adql/adql.rb', line 835 def alias_name @alias_name end |
#name ⇒ Object
Returns the value of attribute name.
835 836 837 |
# File 'lib/voruby/adql/adql.rb', line 835 def name @name end |
#xpath_name ⇒ Object
Returns the value of attribute xpath_name.
835 836 837 |
# File 'lib/voruby/adql/adql.rb', line 835 def xpath_name @xpath_name end |
Class Method Details
.from_xml(node) ⇒ Object
847 848 849 850 |
# File 'lib/voruby/adql/adql.rb', line 847 def self.from_xml(node) type_s = node.find_attribute('type', 'http://www.w3.org/2001/XMLSchema-instance') table = ObjectBuilder.get_class_for(type_s).from_xml(node) end |
Instance Method Details
#to_adqls ⇒ Object
203 204 205 206 207 208 209 |
# File 'lib/voruby/adql/transforms.rb', line 203 def to_adqls if self.alias_name "#{self.name} #{self.alias_name}" else self.name end end |
#to_s ⇒ Object
843 844 845 |
# File 'lib/voruby/adql/adql.rb', line 843 def to_s "{name=#{self.name},alias=#{self.alias_name},xpath=#{self.xpath_name}}" end |