From 57d792d260aec3e4220f5195ae3a7f1b108ab2fe Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Mon, 13 Sep 2010 17:09:37 +0200 Subject: intermediary commit for new owl serializer --- application.rb | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/application.rb b/application.rb index c361a5d..2bdc716 100755 --- a/application.rb +++ b/application.rb @@ -13,18 +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 if data.creator - if data.compounds - data.compounds.each do |compound| - owl.add_data_entries compound,data.data[compound] - end - end - owl.rdf -# nt + beginning = Time.now + owl = OpenTox::OwlSerializer.create 'Dataset', uri + owl.annotate "title", data.title + owl.annotate "creator", data.creator if data.creator +# if data.compounds +# data.compounds.each do |compound| +# owl.add_data_entries compound,data.data[compound] +# end +# end + nt = owl.rdf + LOGGER.debug "OWL creation took #{Time.now - beginning} seconds" + nt end end -- cgit v1.2.3