summaryrefslogtreecommitdiff
path: root/report
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2013-03-26 11:00:33 +0100
committerChristoph Helma <helma@in-silico.ch>2013-03-26 11:00:33 +0100
commit4c23e95dab563d74b4e86404608cc356a9b20875 (patch)
tree0fffdab89f6d89ca84c6f5c50d0f76f512efbc4b /report
parent3fd8236e4ce9cbf3232d05661f33def68895b3e0 (diff)
initial adjustments for refactored version
Diffstat (limited to 'report')
-rwxr-xr-xreport/report_application.rb4
-rwxr-xr-xreport/validation_access.rb13
2 files changed, 9 insertions, 8 deletions
diff --git a/report/report_application.rb b/report/report_application.rb
index 0890d0e..1273463 100755
--- a/report/report_application.rb
+++ b/report/report_application.rb
@@ -44,7 +44,7 @@ class Validation::Application < OpenTox::Service
description =
"A list of all report types."
content_type "text/html"
- OpenTox.text_to_html rs.get_report_types,@subjectid,related_links,description
+ rs.get_report_types.to_html(related_links,description)
else
content_type "text/uri-list"
rs.get_report_types
@@ -88,7 +88,7 @@ class Validation::Application < OpenTox::Service
# VAL_ATTR_TTEST_CLASS.join(",")+"', default for regression: '"+VAL_ATTR_TTEST_REGR.join(",")+"'")
# end
content_type "text/html"
- OpenTox.text_to_html rs.get_all_reports(params[:report_type], params),@subjectid,related_links,description#,post_command
+ rs.get_all_reports(params[:report_type], params).to_html related_links,description#,post_command
else
content_type "text/uri-list"
rs.get_all_reports(params[:report_type], params)
diff --git a/report/validation_access.rb b/report/validation_access.rb
index fd1fda3..fe2c401 100755
--- a/report/validation_access.rb
+++ b/report/validation_access.rb
@@ -142,7 +142,7 @@ class Reports::ValidationDB
def training_feature_dataset_uri(validation, subjectid)
m = OpenTox::Model::Generic.find(validation.model_uri, subjectid)
if m
- f = m.metadata[OT.featureDataset]
+ f = m.metadata[RDF::OT.featureDataset]
return f.chomp if f
end
internal_server_error "no feature dataset found"
@@ -153,7 +153,8 @@ class Reports::ValidationDB
test_dataset = Lib::DatasetCache.find( validation.test_dataset_uri, subjectid )
features_found = true
training_features.features.each do |f|
- unless test_dataset.find_feature(f.uri)
+ unless test_dataset.features.include?(f)
+ #unless test_dataset.find_feature_uri(f.uri)
features_found = false
$logger.debug "training-feature are not in test-datset #{f}"
break
@@ -165,12 +166,12 @@ class Reports::ValidationDB
else
m = OpenTox::Model::Generic.find(validation.model_uri, subjectid)
feat_gen = nil
- m.metadata[OT.parameters].each do |h|
- if h[DC.title] and h[DC.title]=~/feature_generation/ and h[OT.paramValue]
- feat_gen = h[OT.paramValue]
+ m.metadata[RDF::OT.parameters].each do |h|
+ if h[RDF::DC.title] and h[RDF::DC.title]=~/feature_generation/ and h[RDF::OT.paramValue]
+ feat_gen = h[RDF::OT.paramValue]
break
end
- end if m and m.metadata[OT.parameters]
+ end if m and m.metadata[RDF::OT.parameters]
internal_server_error "no feature creation alg found" unless feat_gen
feat_gen = File.join(feat_gen,"match") if feat_gen=~/fminer/
uri = OpenTox::RestClientWrapper.post(feat_gen,{:subjectid => subjectid,