diff options
author | mr <mr@mrautenberg.de> | 2011-10-11 12:37:14 +0200 |
---|---|---|
committer | mr <mr@mrautenberg.de> | 2011-10-11 12:37:14 +0200 |
commit | 680b552ce6d135a1730f83eb23da44ae244c2aa8 (patch) | |
tree | d4a4f5b9edce67794d3fd4ef7155425a9d24d5e9 /application.rb | |
parent | 99a50ecb6c6cbff678048c2f60eafcfe476c1b64 (diff) |
endpoint for external dataset
Diffstat (limited to 'application.rb')
-rw-r--r-- | application.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/application.rb b/application.rb index a75c6c0..50aee72 100644 --- a/application.rb +++ b/application.rb @@ -281,6 +281,7 @@ post '/models' do # create a new model raise "#{params[:file][:filename]} has an unsupported file type." end @dataset.features[@dataset.features.keys.first][OWL.sameAs] = params[:endpoint].split(',').first if params[:endpoint] + @model.update :endpoint_uri => params[:endpoint].split(',').first, :endpoint => params[:endpoint].split(',')[1..99].to_s.gsub(/^"(.*?)"$/,'\1') if params[:endpoint] @dataset.save(@subjectid) rescue => e error "Dataset creation failed '#{e.message}'",e @@ -290,6 +291,11 @@ post '/models' do # create a new model else @prediction_feature = OpenTox::Feature.find(@dataset.features.keys.first,@subjectid) end + #else + # test when external dataset is enabled: + #if @dataset.features[@dataset.features.keys.first][OWL.sameAs] + # @model.update :endpoint_uri => @dataset.features[@dataset.features.keys.first][OWL.sameAs], :endpoint => OpenTox::Ontology::Echa.get_endpoint_name(@dataset.features[@dataset.features.keys.first][OWL.sameAs]) + #end end task.progress(10) if @dataset.compounds.size < 10 |