summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2010-09-13 17:09:37 +0200
committerChristoph Helma <helma@in-silico.ch>2010-09-13 17:09:37 +0200
commit57d792d260aec3e4220f5195ae3a7f1b108ab2fe (patch)
tree389a06dcfbd22a0552f7622bc4aefc057121f082
parentabb1d628ec5109dc7e74bafb4de1d575dcf3d075 (diff)
intermediary commit for new owl serializer
-rwxr-xr-xapplication.rb24
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