Class Bio::PhyloXML::Uri
In: lib/bio/db/phyloxml/phyloxml_elements.rb
Parent: Object

A uniform resource identifier. In general, this is expected to be an URL (for example, to link to an image on a website, in which case the ‘type’ attribute might be ‘image’ and ‘desc’ might be ‘image of a California sea hare’)

Methods

to_xml  

Attributes

desc  [RW]  String. Description of the uri. For example, image of a California sea hare‘
type  [RW]  String. For example, image.
uri  [RW]  String. URL of the resource.

Public Instance methods

Converts elements to xml representation. Called by PhyloXML::Writer class.

[Source]

     # File lib/bio/db/phyloxml/phyloxml_elements.rb, line 678
678:       def to_xml        
679:         if @uri != nil
680:           xml_node = LibXML::XML::Node.new('uri', @uri)
681:           Writer.generate_xml(xml_node, self, [
682:             [:attr, 'desc'],
683:             [:attr, 'type']])
684:           return xml_node
685:         end
686:       end

[Validate]