diff options
author | Christoph Helma <helma@in-silico.ch> | 2013-07-17 14:50:35 +0200 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2013-07-17 14:50:35 +0200 |
commit | b54ba9b8d9bf3324cb15f2bb61de3aba96138ebc (patch) | |
tree | 88e54a62854954d0b024f823bbc26d7c22407c21 | |
parent | 6e9eec008cca664006c946ce61d7c535068f0778 (diff) |
uri objects fixed in ntriples serialsiation
-rw-r--r-- | application.rb | 7 | ||||
-rw-r--r-- | helper.rb | 2 |
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 @@ -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") |