class Bio::PhyloXML::Uri

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’)

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

to_xml() click to toggle source

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

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