view · edit · sidebar · attach · print · history

20130405-update-swissregd

<< | Index | >>


Summary

  • Update swissreg
  • Update TextInfo Plugin
    • Improve saving.
    • Enable Swissmedicinfo PI Updater

Commits

Index


Update swissregd

Swissregd Server does not respond to POST Request, in Http Session.

[4] 1.9.3-p194(#<ODDB::Swissreg::Session>)> headers
=> [["Host", "www.swissreg.ch"],
 ["User-Agent",
  "Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20100101 Firefox/16.0"],
 ["Accept",
  "text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1"],
 ["Accept-Language", "de-ch,en-us;q=0.7,en;q=0.3"],
 ["Accept-Charset", "UTF-8"],
 ["Keep-Alive", "300"],
 ["Connection", "keep-alive"],
 ["Content-Type", "application/x-www-form-urlencoded"]]
[5] 1.9.3-p194(#<ODDB::Swissreg::Session>)> post_body(hash)
=> "id_swissreg%3A_link_hidden_=&id_swissreg_SUBMIT=1&id_swissreg%3A_idcl=id_swissreg_sub_nav_ipiNavigation_item0&autoScroll=0%2C0&javax.faces.ViewState=rO0ABXVyABNbTGphdmEubGFuZy5PYmplY3Q7kM5YnxBzKWwCAAB4cAAAAAN0AAExcHQADi9qc3Avc3RhcnQuanNw"
[6] 1.9.3-p194(#<ODDB::Swissreg::Session>)> path
=> "https://www.swissreg.ch/srclient/faces/jsp/start.jsp"
[7] 1.9.3-p194(#<ODDB::Swissreg::Session>)> 
...
...

pending


Debug textinfo plugin

    def store_fachinfo languages
      @updated_fis += 1 
      pointer = Persistence::Pointer.new(:fachinfo)
      @app.update(pointer.creator, languages)
    end  
    def store_patinfo reg, languages
      @updated_pis +=1
      existing = reg.sequences.collect do |seqnr, seq| 
        seq.patinfo end.compact.first
      ptr = Persistence::Pointer.new(:patinfo).creator
      if existing
        ptr = existing.pointer
      end  
      @app.update ptr, languages
    end

Patinfo does not have Persistence methods.

Plugin: ODDB::TextInfoPlugin
Error: NoMethodError
Message: undefined method `odba_isolated_store' for #<ODDB::PatinfoDocument2001:0x00000040eb2068>
Backtrace:
/var/www/oddb.org/src/plugin/text_info.rb:95:in `block in replace'
/var/www/oddb.org/src/plugin/text_info.rb:93:in `each'
/var/www/oddb.org/src/plugin/text_info.rb:93:in `replace'
/var/www/oddb.org/src/plugin/text_info.rb:182:in `block (2 levels) in update_patinfo'
/var/www/oddb.org/src/model/registration.rb:152:in `each'
/var/www/oddb.org/src/model/registration.rb:152:in `each_sequence'

And, old replace dose not care about FI/PI data without description.

  90     def replace text_info, container, type
  91       old_ti = container.send type
  92       @app.update container.pointer, type => text_info.pointer
  93       if old_ti && old_ti.empty?
  94         @app.delete old_ti.pointer
  95       end
  96     end
commits
view · edit · sidebar · attach · print · history
Page last modified on April 05, 2013, at 11:37 AM