Class: OpenTox::CrossvalidationReport
- Inherits:
-
Object
- Object
- OpenTox::CrossvalidationReport
- Includes:
- OpenTox
- Defined in:
- lib/validation.rb
Instance Attribute Summary
Attributes included from OpenTox
Class Method Summary collapse
-
.create(crossvalidation_uri, subjectid = nil, waiting_task = nil) ⇒ OpenTox::CrossvalidationReport
creates a crossvalidation report via crossvalidation.
-
.find(uri, subjectid = nil) ⇒ OpenTox::CrossvalidationReport
finds CrossvalidationReport via uri, raises error if not found.
-
.find_for_crossvalidation(crossvalidation_uri, subjectid = nil) ⇒ OpenTox::CrossvalidationReport
finds CrossvalidationReport for a particular crossvalidation.
Methods included from OpenTox
#add_metadata, all, #delete, #initialize, #load_metadata, sign_in, text_to_html, #to_rdfxml
Class Method Details
.create(crossvalidation_uri, subjectid = nil, waiting_task = nil) ⇒ OpenTox::CrossvalidationReport
creates a crossvalidation report via crossvalidation
280 281 282 283 284 |
# File 'lib/validation.rb', line 280 def self.create( crossvalidation_uri, subjectid=nil, waiting_task=nil ) uri = RestClientWrapper.post(File.join(CONFIG[:services]["opentox-validation"],"/report/crossvalidation"), { :validation_uris => crossvalidation_uri, :subjectid => subjectid }, {}, waiting_task ) CrossvalidationReport.new(uri) end |
.find(uri, subjectid = nil) ⇒ OpenTox::CrossvalidationReport
finds CrossvalidationReport via uri, raises error if not found
258 259 260 261 262 263 |
# File 'lib/validation.rb', line 258 def self.find( uri, subjectid=nil ) OpenTox::RestClientWrapper.get(uri,{:subjectid => subjectid}) rep = CrossvalidationReport.new(uri) rep.( subjectid ) rep end |
.find_for_crossvalidation(crossvalidation_uri, subjectid = nil) ⇒ OpenTox::CrossvalidationReport
finds CrossvalidationReport for a particular crossvalidation
269 270 271 272 273 |
# File 'lib/validation.rb', line 269 def self.find_for_crossvalidation( crossvalidation_uri, subjectid=nil ) uris = RestClientWrapper.get(File.join(CONFIG[:services]["opentox-validation"], "/report/crossvalidation?crossvalidation="+crossvalidation_uri), {:subjectid => subjectid}).chomp.split("\n") uris.size==0 ? nil : CrossvalidationReport.new(uris[-1]) end |