diff options
author | mr <mr@mrautenberg.de> | 2010-12-14 12:30:20 +0100 |
---|---|---|
committer | mr <mr@mrautenberg.de> | 2010-12-14 12:30:20 +0100 |
commit | 4c2470353a1e3b69b4260d0052c9c48137ef76d3 (patch) | |
tree | f9b0a4dced11c446023b07565066bb0a9de6af27 /lib/model.rb | |
parent | de12a8002ebc0bf4018588deafd5057b6478f414 (diff) |
remove token_id from tables in database
Diffstat (limited to 'lib/model.rb')
-rw-r--r-- | lib/model.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/model.rb b/lib/model.rb index 5dc4d4a..9c2fb97 100644 --- a/lib/model.rb +++ b/lib/model.rb @@ -111,7 +111,7 @@ module OpenTox # @param [String] compound_uri Compound URI # @param [optinal,Boolean] verbose Verbose prediction (output includes neighbors and features) # @return [OpenTox::Dataset] Dataset with prediction - def predict(compound_uri,verbose=false) + def predict(compound_uri,verbose=false,token_id=nil) @compound = Compound.new compound_uri features = {} @@ -119,7 +119,7 @@ module OpenTox unless @prediction_dataset #@prediction_dataset = cached_prediction #return @prediction_dataset if cached_prediction - @prediction_dataset = Dataset.create + @prediction_dataset = Dataset.create(CONFIG[:services]["opentox-dataset"], token_id) @prediction_dataset.add_metadata( { OT.hasSource => @uri, DC.creator => @uri, @@ -217,7 +217,7 @@ module OpenTox end end - @prediction_dataset.save + @prediction_dataset.save(token_id) @prediction_dataset end @@ -257,8 +257,8 @@ module OpenTox end # Save model at model service - def save - self.uri = RestClientWrapper.post(@uri,{:content_type => "application/x-yaml", :token_id => @token_id},self.to_yaml) + def save(token_id) + self.uri = RestClientWrapper.post(@uri,{:content_type => "application/x-yaml", :token_id => token_id},self.to_yaml) end # Delete model at model service |