Class: OpenTox::QMRFReport
- Inherits:
-
Object
- Object
- OpenTox::QMRFReport
- Includes:
- OpenTox
- Defined in:
- lib/validation.rb
Instance Attribute Summary
Attributes included from OpenTox
Class Method Summary collapse
-
.create(model_uri, subjectid = nil, waiting_task = nil) ⇒ OpenTox::QMRFReport
creates a qmrf report via model.
-
.find(uri, subjectid = nil) ⇒ OpenTox::QMRFReport
finds QMRFReport, raises Error if not found.
-
.find_for_model(model_uri, subjectid = nil) ⇒ OpenTox::QMRFReport
finds QMRF report for a particular model.
Methods included from OpenTox
#add_metadata, all, #delete, #initialize, #load_metadata, sign_in, text_to_html, #to_rdfxml
Class Method Details
.create(model_uri, subjectid = nil, waiting_task = nil) ⇒ OpenTox::QMRFReport
creates a qmrf report via model
370 371 372 373 374 |
# File 'lib/validation.rb', line 370 def self.create( model_uri, subjectid=nil, waiting_task=nil ) uri = RestClientWrapper.post(File.join(CONFIG[:services]["opentox-validation"],"/reach_report/qmrf"), { :model_uri => model_uri, :subjectid => subjectid }, {}, waiting_task ) QMRFReport.new(uri) end |
.find(uri, subjectid = nil) ⇒ OpenTox::QMRFReport
finds QMRFReport, raises Error if not found
349 350 351 352 353 |
# File 'lib/validation.rb', line 349 def self.find( uri, subjectid=nil ) # PENDING load crossvalidation data? OpenTox::RestClientWrapper.get(uri,{:subjectid => subjectid}) QMRFReport.new(uri) end |
.find_for_model(model_uri, subjectid = nil) ⇒ OpenTox::QMRFReport
finds QMRF report for a particular model
359 360 361 362 363 |
# File 'lib/validation.rb', line 359 def self.find_for_model( model_uri, subjectid=nil ) uris = RestClientWrapper.get(File.join(CONFIG[:services]["opentox-validation"], "/reach_report/qmrf?model="+model_uri), {:subjectid => subjectid}).chomp.split("\n") uris.size==0 ? nil : QMRFReport.new(uris[-1]) end |