diff options
author | mguetlein <martin.guetlein@gmail.com> | 2010-05-06 11:32:05 +0200 |
---|---|---|
committer | mguetlein <martin.guetlein@gmail.com> | 2010-05-06 11:32:05 +0200 |
commit | 9e356d0d94ea4fe210ea7cefce5d4c1179cb63cd (patch) | |
tree | 486bd97d9e968c56c755dfa69331a8cabc70895f /lib/compound.rb | |
parent | 8439bb9b337bded4a54018c03500a15082bce6b0 (diff) |
major change: using literal datatypes in owl
Diffstat (limited to 'lib/compound.rb')
-rw-r--r-- | lib/compound.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/compound.rb b/lib/compound.rb index 0ee853d..cc29fc5 100644 --- a/lib/compound.rb +++ b/lib/compound.rb @@ -18,18 +18,18 @@ module OpenTox @uri = File.join(@@config[:services]["opentox-compound"],URI.escape(@inchi)) elsif params[:name] # paranoid URI encoding to keep SMILES charges and brackets - @inchi = RestClient.get("#{@@cactus_uri}#{URI.encode(params[:name], Regexp.new("[^#{URI::PATTERN::UNRESERVED}]"))}/stdinchi").chomp + @inchi = RestClientWrapper.get("#{@@cactus_uri}#{URI.encode(params[:name], Regexp.new("[^#{URI::PATTERN::UNRESERVED}]"))}/stdinchi").chomp @uri = File.join(@@config[:services]["opentox-compound"],URI.escape(@inchi)) elsif params[:uri] @uri = params[:uri] case params[:uri] when /ambit/ # Ambit does not deliver InChIs reliably - smiles = RestClient.get @uri, :accept => 'chemical/x-daylight-smiles' + smiles = RestClientWrapper.get @uri, :accept => 'chemical/x-daylight-smiles' @inchi = obconversion(smiles,'smi','inchi') when /InChI/ # shortcut for IST services @inchi = params[:uri].sub(/^.*InChI/, 'InChI') else - @inchi = RestClient.get @uri, :accept => 'chemical/x-inchi' + @inchi = RestClientWrapper.get @uri, :accept => 'chemical/x-inchi' end end end @@ -44,7 +44,7 @@ module OpenTox end def image - RestClient.get("#{@@cactus_uri}#{@inchi}/image") + RestClientWrapper.get("#{@@cactus_uri}#{@inchi}/image") end def image_uri |