[Mulgara-svn] r1695 - trunk/src/jar/querylang/java/org/mulgara/protocol/http
pag at mulgara.org
pag at mulgara.org
Thu May 21 23:25:57 UTC 2009
Author: pag
Date: 2009-05-21 16:25:56 -0700 (Thu, 21 May 2009)
New Revision: 1695
Modified:
trunk/src/jar/querylang/java/org/mulgara/protocol/http/ProtocolServlet.java
Log:
Fixed a problem of overriding JSON format for any queries that don't use construct
Modified: trunk/src/jar/querylang/java/org/mulgara/protocol/http/ProtocolServlet.java
===================================================================
--- trunk/src/jar/querylang/java/org/mulgara/protocol/http/ProtocolServlet.java 2009-05-20 22:18:50 UTC (rev 1694)
+++ trunk/src/jar/querylang/java/org/mulgara/protocol/http/ProtocolServlet.java 2009-05-21 23:25:56 UTC (rev 1695)
@@ -739,7 +739,7 @@
if (cmd instanceof ConstructQuery) {
if (!type.isGraphType) type = DEFAULT_GRAPH_OUTPUT_TYPE;
} else {
- if (type.isGraphType) type = DEFAULT_OUTPUT_TYPE;
+ if (!type.isBindingType) type = DEFAULT_OUTPUT_TYPE;
}
return type;
@@ -750,16 +750,18 @@
* Enumeration of the various output types, depending on mime type.
*/
enum Output {
- XML("application/sparql-results+xml", false),
- JSON("application/sparql-results+json", true),
- RDFXML("application/rdf+xml", true),
- N3("text/rdf+n3", true);
+ XML("application/sparql-results+xml", false, true),
+ JSON("application/sparql-results+json", true, true),
+ RDFXML("application/rdf+xml", true, false),
+ N3("text/rdf+n3", true, false);
final String mimeText;
final boolean isGraphType;
- private Output(String mimeText, boolean isGraphType) {
+ final boolean isBindingType;
+ private Output(String mimeText, boolean isGraphType, boolean isBindingType) {
this.mimeText = mimeText;
this.isGraphType = isGraphType;
+ this.isBindingType = isBindingType;
}
static private Map<String,Output> outputs = new HashMap<String,Output>();
More information about the Mulgara-svn
mailing list