diff options
author | Christoph Helma <helma@in-silico.ch> | 2010-09-13 17:09:37 +0200 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2010-09-13 17:09:37 +0200 |
commit | 57d792d260aec3e4220f5195ae3a7f1b108ab2fe (patch) | |
tree | 389a06dcfbd22a0552f7622bc4aefc057121f082 /application.rb | |
parent | abb1d628ec5109dc7e74bafb4de1d575dcf3d075 (diff) |
intermediary commit for new owl serializer
Diffstat (limited to 'application.rb')
-rwxr-xr-x | application.rb | 24 |
1 files 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}> <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 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 |