From abb1d628ec5109dc7e74bafb4de1d575dcf3d075 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Tue, 7 Sep 2010 13:02:05 +0200 Subject: owl cache temporarily deactivated --- application.rb | 16 ++++++++++------ 1 file 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}> <#{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' -- cgit v1.2.3