From fa108ccae6f824b4b38b7ea1cd8ea5ece87c1d66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20G=C3=BCtlein?= Date: Thu, 6 Jun 2013 12:44:21 +0200 Subject: commenting to_turtle and to_html --- lib/opentox.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/opentox.rb') diff --git a/lib/opentox.rb b/lib/opentox.rb index adf0030..9d908bc 100644 --- a/lib/opentox.rb +++ b/lib/opentox.rb @@ -165,6 +165,7 @@ module OpenTox end end + # @return [String] converts object to turtle-string def to_turtle # redefined to use prefixes (not supported by RDF::Writer) prefixes = {:rdf => "http://www.w3.org/1999/02/22-rdf-syntax-ns#"} ['OT', 'DC', 'XSD', 'OLO'].each{|p| prefixes[p.downcase.to_sym] = eval("RDF::#{p}.to_s") } @@ -174,6 +175,7 @@ module OpenTox end end + # @return [String] converts OpenTox object into html document (by first converting it to a string) def to_html to_turtle.to_html end -- cgit v1.2.3 From 69e0385b1a80721cbbeb948ede341da647dd7f2d Mon Sep 17 00:00:00 2001 From: gebele Date: Fri, 7 Jun 2013 16:36:33 +0200 Subject: use subclass to get all predicates in turtle output --- lib/opentox.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/opentox.rb') diff --git a/lib/opentox.rb b/lib/opentox.rb index 9d908bc..09e5e41 100644 --- a/lib/opentox.rb +++ b/lib/opentox.rb @@ -170,7 +170,7 @@ module OpenTox prefixes = {:rdf => "http://www.w3.org/1999/02/22-rdf-syntax-ns#"} ['OT', 'DC', 'XSD', 'OLO'].each{|p| prefixes[p.downcase.to_sym] = eval("RDF::#{p}.to_s") } create_rdf - RDF::Writer.for(:turtle).buffer(:prefixes => prefixes) do |writer| + RDF::Turtle::Writer.for(:turtle).buffer(:prefixes => prefixes) do |writer| writer << @rdf end end -- cgit v1.2.3