Method: Bio::DAS#get_entry_points
- Defined in:
- lib/bio/io/das.rb
#get_entry_points(dsn) ⇒ Object
Returns Bio::DAS::ENTRY_POINT. The ‘dsn’ can be a String or a Bio::DAS::DSN object.
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/bio/io/das.rb', line 74 def get_entry_points(dsn) entry_point = ENTRY_POINT.new if dsn.instance_of?(Bio::DAS::DSN) src = dsn.source else src = dsn end result = Bio::Command.post_form("#{@server}/das/#{src}/entry_points") doc = REXML::Document.new(result.body) doc.elements.each('/descendant::ENTRY_POINTS') do |e| entry_point.href = e.attributes['href'] entry_point.version = e.attributes['version'] e.elements.each do |e| segment = SEGMENT.new segment.entry_id = e.attributes['id'] segment.start = e.attributes['start'] segment.stop = e.attributes['stop'] || e.attributes['size'] segment.orientation = e.attributes['orientation'] segment.subparts = e.attributes['subparts'] segment.description = e.text entry_point.segments << segment end end entry_point end |