summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2010-09-07 13:02:05 +0200
committerChristoph Helma <helma@in-silico.ch>2010-09-07 13:02:05 +0200
commitabb1d628ec5109dc7e74bafb4de1d575dcf3d075 (patch)
tree6fea8a815671afd8849e7844210e336bdce55c60
parent95a0b8517737d70b4db4b525a0f1492b0c1a5983 (diff)
owl cache temporarily deactivated
-rwxr-xr-xapplication.rb16
1 files changed, 10 insertions, 6 deletions
diff --git a/application.rb b/application.rb
index 2ace1db..c361a5d 100755
--- a/application.rb
+++ b/application.rb
@@ -13,15 +13,18 @@ class Dataset
def to_owl
data = YAML.load(yaml)
+# nt = "<#{uri}> <title> <#{data.title}> .\n"
+# nt += "<#{uri}> <creator> <#{data.creator}> .\n"
owl = OpenTox::Owl.create 'Dataset', uri
owl.set "title", data.title
- owl.set "creator", data.creator
+ owl.set "creator", data.creator if data.creator
if data.compounds
data.compounds.each do |compound|
owl.add_data_entries compound,data.data[compound]
end
end
owl.rdf
+# nt
end
end
@@ -77,11 +80,12 @@ def get_dataset( params, request, response, only_metadata=false )
if only_metadata
dataset.to_owl
else
- unless dataset.owl # lazy owl creation
- dataset.owl = dataset.to_owl
- dataset.save
- end
- dataset.owl
+ #unless dataset.owl # lazy owl creation
+ #dataset.owl = dataset.to_owl
+ #dataset.save
+ #end
+ #dataset.owl
+ dataset.to_owl
end
when /yaml/
response['Content-Type'] = 'application/x-yaml'