Taxonomy class
Converts elements to xml representation. Called by PhyloXML::Writer class.
# File lib/bio/db/phyloxml/phyloxml_elements.rb, line 92 def to_xml taxonomy = LibXML::XML::Node.new('taxonomy') taxonomy["type"] = @type if @type != nil taxonomy["id_source"] = @id_source if @id_source != nil PhyloXML::Writer.generate_xml(taxonomy, self, [[:complex, 'id', @taxonomy_id], [:pattern, 'code', @code, Regexp.new("^[a-zA-Z0-9_]{2,10}$")], [:simple, 'scientific_name', @scientific_name], [:simple, 'authority', @authority], [:simplearr, 'common_name', @common_names], [:simplearr, 'synonym', @synonyms], [:simple, 'rank', @rank], [:complex, 'uri',@uri]]) #@todo anything else return taxonomy end
Generated with the Darkfish Rdoc Generator 2.