summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgebele <gebele@in-silico.ch>2013-06-11 12:45:30 +0200
committergebele <gebele@in-silico.ch>2013-06-11 12:45:30 +0200
commitc934e64879a30f640fc2b9fcaa28daacd874cd59 (patch)
treed0df0028c7959d8a1b636a9a311db1479d80d859
parentb92b9702d8c8f8d864d2069e36d05203eb31aa37 (diff)
added missing accept format for uri-list
-rw-r--r--lib/4store.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/4store.rb b/lib/4store.rb
index 00414c0..24200ae 100644
--- a/lib/4store.rb
+++ b/lib/4store.rb
@@ -7,10 +7,10 @@ module OpenTox
def self.list mime_type
bad_request_error "'#{mime_type}' is not a supported mime type. Please specify one of #{@@accept_formats.join(", ")} in the Accept Header." unless @@accept_formats.include? mime_type
- if mime_type =~ /(uri-list|html)/
+ if mime_type =~ /(uri-list|html|sparql-results)/
sparql = "SELECT DISTINCT ?g WHERE {GRAPH ?g {?s <#{RDF.type}> <#{klass}>} }"
else
- sparql = "CONSTRUCT {?s ?p ?o.} WHERE {?s <#{RDF.type}> <#{klass}>; ?p ?o. }"
+ sparql = "CONSTRUCT {?s <#{RDF.type}> <#{klass}>.} WHERE { GRAPH ?g {?s <#{RDF.type}> <#{klass}>.} }"
end
query sparql, mime_type
end