Class: OpenTox::CrossvalidationReport

Inherits:
Object
  • Object
show all
Includes:
OldOpenTox
Defined in:
lib/validation.rb

Instance Attribute Summary

Attributes included from OldOpenTox

#metadata, #uri

Class Method Summary collapse

Methods included from OldOpenTox

#delete, #initialize, #load_metadata

Class Method Details

.create(crossvalidation_uri, waiting_task = nil) ⇒ OpenTox::CrossvalidationReport

creates a crossvalidation report via crossvalidation


288
289
290
291
292
293
# File 'lib/validation.rb', line 288

def self.create( crossvalidation_uri, waiting_task=nil )
  uri = RestClientWrapper.post(File.join($validation[:uri],"/report/crossvalidation"),
    { :validation_uris => crossvalidation_uri }, {}, waiting_task )
  uri = wait_for_task(uri)
  CrossvalidationReport.new(uri)
end

.find(uri) ⇒ OpenTox::CrossvalidationReport

finds CrossvalidationReport via uri, raises error if not found


268
269
270
271
272
273
# File 'lib/validation.rb', line 268

def self.find( uri )
  OpenTox::RestClientWrapper.get(uri)
  rep = CrossvalidationReport.new(uri)
  rep.
  rep
end

.find_for_crossvalidation(crossvalidation_uri) ⇒ OpenTox::CrossvalidationReport

finds CrossvalidationReport for a particular crossvalidation


278
279
280
281
282
# File 'lib/validation.rb', line 278

def self.find_for_crossvalidation( crossvalidation_uri )
  uris = RestClientWrapper.get(File.join($validation[:uri],
    "/report/crossvalidation?crossvalidation="+crossvalidation_uri)).chomp.split("\n")
  uris.size==0 ? nil : CrossvalidationReport.new(uris[-1])
end