jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [14/16] jena git commit: Remove uncomments.
Date Thu, 20 Aug 2015 11:08:45 GMT
Remove uncomments.

Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/4ddf9ec3
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/4ddf9ec3
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/4ddf9ec3

Branch: refs/heads/JENA-491-construct-quads
Commit: 4ddf9ec3247b8792a0024d72c76c3a1af45473f1
Parents: 1555126
Author: Andy Seaborne <andy@apache.org>
Authored: Thu Aug 20 11:32:36 2015 +0100
Committer: Andy Seaborne <andy@apache.org>
Committed: Thu Aug 20 11:32:36 2015 +0100

----------------------------------------------------------------------
 .../jena/fuseki/servlets/ResponseDataset.java   | 22 +++++---------------
 1 file changed, 5 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/4ddf9ec3/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ResponseDataset.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ResponseDataset.java
b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ResponseDataset.java
index 1464b99..f05331d 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ResponseDataset.java
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ResponseDataset.java
@@ -73,8 +73,7 @@ public class ResponseDataset
         
         String mimeType = null ;        // Header request type 
 
-        // TODO Use MediaType throughout.
-        MediaType i = ConNeg.chooseContentType(request, DEF.quadsOffer, DEF.acceptNQuads)
;
+        MediaType i = ConNeg.chooseContentType(request, DEF.constructOffer, DEF.acceptTurtle)
;
         if ( i != null )
             mimeType = i.getContentType() ;
 
@@ -109,26 +108,15 @@ public class ResponseDataset
         Lang lang = RDFLanguages.contentTypeToLang(contentType) ;
         if ( lang == null )
             ServletOps.errorBadRequest("Can't determine output content type: "+contentType)
;
-        
-//        if ( rdfw instanceof RDFXMLWriterI )
-//            rdfw.setProperty("showXmlDeclaration", "true") ;
-
-    //        // Write locally to check it's possible.
-    //        // Time/space tradeoff.
-    //        try {
-    //            OutputStream out = new NullOutputStream() ;
-    //            RDFDataMgr.write(out, model, lang) ;
-    //            IO.flush(out) ;
-    //        } catch (JenaException ex)
-    //        {
-    //            SPARQL_ServletBase.errorOccurred(ex) ;
-    //        }
 
         try {
             ResponseResultSet.setHttpResponse(action, contentType, charset) ; 
             response.setStatus(HttpSC.OK_200) ;
             ServletOutputStream out = response.getOutputStream() ;
-            RDFDataMgr.write(out, dataset, lang) ;
+            if ( RDFLanguages.isQuads(lang) )
+                RDFDataMgr.write(out, dataset, lang) ;
+            else
+                RDFDataMgr.write(out, dataset.getDefaultModel(), lang) ;
             out.flush() ;
         }
         catch (Exception ex) { 


Mime
View raw message