Class | Bio::Hinv::KeywordSearch
In: | lib/bio/io/hinv.rb
Parent: | Object

serv = Bio::Hinv::KeywordSearch.new serv.query("query" => "HIT00002218*", "start" => 1, "end" => 100) puts serv.result puts serv.size puts serv.start puts serv.end

### Methods

end new query result size start

### Included Modules

Common

### Public Class methods

new()

[Source]

         # File lib/bio/io/hinv.rb, line 371
    371:       def initialize
    372:         @url = BASE_URI + "keyword_search.php"
    373:       end

### Public Instance methods

end()

[Source]

         # File lib/bio/io/hinv.rb, line 413
    413:       def end
    414:         @xml.elements['//END'].text.to_i
    415:       end

query(hash = {})

[Source]

         # File lib/bio/io/hinv.rb, line 375
    375:       def query(hash = {})
    376:         default = {
    377:           "start" => 1,
    378:           "end" => 100
    379:         }
    380:         options = default.update(hash)
    381:         super(options)
    382:       end

result()

<?xml version=‘1.0’ encoding=‘UTF-8’?> <HINVDB_SEARCH>

     <QUERY>HIT00002218*</QUERY>
     <SIZE>8</SIZE>
     <START>1</START>
     <END>8</END>
     <H-INVITATIONAL-ID>HIT000022180</H-INVITATIONAL-ID>
     <H-INVITATIONAL-ID>HIT000022181</H-INVITATIONAL-ID>
     <H-INVITATIONAL-ID>HIT000022183</H-INVITATIONAL-ID>
     <H-INVITATIONAL-ID>HIT000022184</H-INVITATIONAL-ID>
     <H-INVITATIONAL-ID>HIT000022185</H-INVITATIONAL-ID>
     <H-INVITATIONAL-ID>HIT000022186</H-INVITATIONAL-ID>
     <H-INVITATIONAL-ID>HIT000022188</H-INVITATIONAL-ID>
     <H-INVITATIONAL-ID>HIT000022189</H-INVITATIONAL-ID>

</HINVDB_SEARCH>

[Source]

         # File lib/bio/io/hinv.rb, line 399
    399:       def result
    400:         list = []
    401:         @xml.elements.each('//H-INVITATIONAL-ID') do |e|
    402:           list << e.text
    403:         end
    404:         return list
    405:       end

size()

[Source]

         # File lib/bio/io/hinv.rb, line 407
    407:       def size
    408:         @xml.elements['//SIZE'].text.to_i
    409:       end

start()

[Source]

         # File lib/bio/io/hinv.rb, line 410
    410:       def start
    411:         @xml.elements['//START'].text.to_i
    412:       end

[Validate]