summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2013-07-17 14:50:35 +0200
committerChristoph Helma <helma@in-silico.ch>2013-07-17 14:50:35 +0200
commitb54ba9b8d9bf3324cb15f2bb61de3aba96138ebc (patch)
tree88e54a62854954d0b024f823bbc26d7c22407c21
parent6e9eec008cca664006c946ce61d7c535068f0778 (diff)
uri objects fixed in ntriples serialsiation
-rw-r--r--application.rb7
-rw-r--r--helper.rb2
2 files changed, 5 insertions, 4 deletions
diff --git a/application.rb b/application.rb
index 61406ec..38295df 100644
--- a/application.rb
+++ b/application.rb
@@ -61,11 +61,12 @@ module OpenTox
# @return [application/rdf+xml] Metadata OWL-DL
get '/dataset/:id/metadata' do
case @accept
+ #{ ?s ?p ?o. ?s <#{RDF.type}> <#{RDF::OT.Dataset}> .}
when "application/rdf+xml", "text/turtle", "text/plain"
sparql = "CONSTRUCT {?s ?p ?o.} FROM <#{@uri}> WHERE {
- { <#{@uri}> ?p ?o. ?s <#{RDF.type}> <#{RDF::OT.Dataset}>. }
- UNION { ?s ?p ?o. ?s <#{RDF.type}> <#{RDF::OT.Parameter}> . }
- MINUS { ?s <#{RDF::OT.dataEntry}> ?o. }
+ { ?s <#{RDF.type}> <#{RDF::OT.Dataset}> ; ?p ?o}
+ UNION { ?s <#{RDF.type}> <#{RDF::OT.Parameter}> ; ?p ?o }
+ MINUS { <#{@uri}> <#{RDF::OT.dataEntry}> ?o. }
} "
FourStore.query sparql, @accept
else
diff --git a/helper.rb b/helper.rb
index 0c17a32..3ffdc70 100644
--- a/helper.rb
+++ b/helper.rb
@@ -181,7 +181,7 @@ module OpenTox
p = Axlsx::Package.new
wb = p.workbook
wb.add_worksheet(:name => "test") do |sheet|
- to_table.each { |row| sheet.add_row row; puts row }
+ to_table.each { |row| sheet.add_row row }
end
p.serialize("test.xlsx")