Skip to Navigation | Skip to Content

openEHR-Implementers mailing list archives

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: openEHR terminology - wiki page


On Tue, 28 Jul 2009 14:55:27 +0200
Bert Verhees <bert.verhees@rosa.nl> wrote:

> Interesting. 
> I found it hard to find good documentation for how to use RESTful in
> Java.
> That is why I did not study it better.
> I will take a look at it.

It may be a surprise for you that I have written only the codes bellow:
http://openehr.jp/repositories/entry/ref-impl-ruby/ruby/trunk/terminology/config/routes.rb
map.terminology 'terminology/:name/:lang/:code',
                :controller => 'terminology',
                :action => 'show'
http://openehr.jp/repositories/entry/ref-impl-ruby/ruby/trunk/terminology/app/controllers/terminology_controller.rb
  def show
    @terminology = Terminology.find(:first,:conditions => {
                                           :name => params[:name],
                                           :lang => params[:lang],
                                           :code => params[:code]})
    if @terminology.nil?
      render :text => '404 not found.', :status => 404
    else
      render :xml => @terminology.to_xml(
                           :skip_types => true, :only => [:rubric])
    end
  end


-- 
KOBAYASHI, Shinji <skoba@moss.gr.jp>