diff options
author | Andreas Maunz <andreas@maunz.de> | 2012-09-19 15:55:37 +0200 |
---|---|---|
committer | Andreas Maunz <andreas@maunz.de> | 2012-09-19 15:55:37 +0200 |
commit | f577119d827729fb540654c1391d35804a262649 (patch) | |
tree | 986094aab4324474b15fe8af8146f985437b2144 /pc.rb | |
parent | c288f2b4e90c78e75a424ccf4a35fdc7efa0e5ff (diff) |
Java
Diffstat (limited to 'pc.rb')
-rw-r--r-- | pc.rb | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -82,9 +82,10 @@ post '/pc/AllDescriptors' do byteArray = Rjb::import('java.io.ByteArrayOutputStream'); printStream = Rjb::import('java.io.PrintStream'); out = byteArray.new() ; Rjb::import('java.lang.System').out = printStream.new(out) # joelib is too verbose s = Rjb::import('JoelibFc') # import main class + t = Rjb::import('ApplyCDKDescriptors') LOGGER.debug "Running PC with pc_type '#{params[:pc_type]}' and lib '#{params[:lib]}'" - OpenTox::Algorithm.pc_descriptors( { :dataset_uri => params[:dataset_uri], :pc_type => params[:pc_type], :rjb => s, :add_uri => true, :task => task, :lib => params[:lib], :subjectid => @subjectid} ) + OpenTox::Algorithm.pc_descriptors( { :dataset_uri => params[:dataset_uri], :pc_type => params[:pc_type], :rjb => {:jl=>s, :cdk => t}, :add_uri => true, :task => task, :lib => params[:lib], :subjectid => @subjectid} ) end raise OpenTox::ServiceUnavailableError.newtask.uri+"\n" if task.status == "Cancelled" halt 202,task.uri.to_s+"\n" @@ -106,7 +107,8 @@ post '/pc/:descriptor' do byteArray = Rjb::import('java.io.ByteArrayOutputStream'); printStream = Rjb::import('java.io.PrintStream'); out = byteArray.new() ; Rjb::import('java.lang.System').out = printStream.new(out) # joelib is too verbose s = Rjb::import('JoelibFc') # import main class - OpenTox::Algorithm.pc_descriptors( { :dataset_uri => params[:dataset_uri], :pc_type => params[:pc_type], :descriptor => params[:descriptor], :rjb => s, :add_uri => false, :task => task, :subjectid => @subjectid} ) + t = Rjb::import('ApplyCDKDescriptors') + OpenTox::Algorithm.pc_descriptors( { :dataset_uri => params[:dataset_uri], :pc_type => params[:pc_type], :descriptor => params[:descriptor], :rjb => {:jl=>s, :cdk => t}, :add_uri => false, :task => task, :subjectid => @subjectid} ) end raise OpenTox::ServiceUnavailableError.newtask.uri+"\n" if task.status == "Cancelled" halt 202,task.uri.to_s+"\n" |