diff options
author | Christoph Helma <helma@in-silico.de> | 2010-01-07 12:22:47 +0100 |
---|---|---|
committer | Christoph Helma <helma@in-silico.de> | 2010-01-07 12:22:47 +0100 |
commit | c4d68eb599a6b563ac9967d3884ea31b0d619e38 (patch) | |
tree | 7fae9829ab42e04e39e34635b604ea8932c333bd /lib/dataset.rb | |
parent | f178a17d3318082dfa923582715b39d72bd07c32 (diff) | |
parent | be07d3be0cc3236a22a47f0905c99f96508c9587 (diff) |
find method fixed
Diffstat (limited to 'lib/dataset.rb')
-rw-r--r-- | lib/dataset.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/dataset.rb b/lib/dataset.rb index 4d05e73..ad69038 100644 --- a/lib/dataset.rb +++ b/lib/dataset.rb @@ -47,8 +47,9 @@ module OpenTox @model.add tuple, OT['complexValue'], complex_value @model.add complex_value, RDF['type'], OT["FeatureValue"] @model.add complex_value, OT['feature'], f - @model.add complex_value, OT['value'], value.to_s - end + @model.add complex_value, OT['value'], value.to_s + end + tuple end @@ -77,7 +78,7 @@ module OpenTox end def self.create(data, content_type = 'application/rdf+xml') - uri = RestClient.post @@config[:services]["opentox-dataset"], data, :content_type => content_type + uri = RestClient.post @@config[:services]["opentox-dataset"], data, :content_type => content_type dataset = Dataset.new dataset.read uri.to_s dataset @@ -85,9 +86,9 @@ module OpenTox def self.find(uri) begin - dataset = Dataset.new - data = RestClient.get uri, :accept => 'application/rdf+xml' # check if the resource is available - dataset.rdf = data + dataset = Dataset.new + data = RestClient.get uri, :accept => 'application/rdf+xml' # check if the resource is available + dataset.rdf = data dataset rescue nil @@ -222,8 +223,7 @@ module OpenTox :source => self.source, :identifier => self.identifier, :compounds => self.compounds.collect{|c| c.to_s.to_s.sub(/^\[(.*)\]$/,'\1')}, - :features => self.features.collect{|f| f.to_s }, - :data_entries => self.data_entries, + :features => self.features.collect{|f| f.to_s } }.to_yaml end |