You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2012/10/16 16:48:32 UTC
svn commit: r1398827 -
/jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_REST.java
Author: andy
Date: Tue Oct 16 14:48:32 2012
New Revision: 1398827
URL: http://svn.apache.org/viewvc?rev=1398827&view=rev
Log:
Use constants.
Remove wrong comments.
Modified:
jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_REST.java
Modified: jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_REST.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_REST.java?rev=1398827&r1=1398826&r2=1398827&view=diff
==============================================================================
--- jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_REST.java (original)
+++ jena/trunk/jena-fuseki/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_REST.java Tue Oct 16 14:48:32 2012
@@ -198,22 +198,11 @@ public abstract class SPARQL_REST extend
protected void perform(long id, DatasetRef desc, HttpServletRequest request, HttpServletResponse response)
{
validate(request) ;
-
-// // Decide on t
-// String uri = request.getRequestURI() ;
-// String method = request.getMethod() ;
-// String dsname = findDataset(uri) ;
-// String trailing = uri.substring(dsname.length()+1) ; // Skip the "/"
-// String qs = request.getQueryString() ;
-
- //Indirect
HttpActionREST action = new HttpActionREST(id, desc, request, response, verbose_debug) ;
- // Direct
dispatch(action) ;
}
- // Public for general dispatch
- public void dispatch(HttpActionREST action)
+ private void dispatch(HttpActionREST action)
{
HttpServletRequest req = action.request ;
HttpServletResponse resp = action.response ;
@@ -291,14 +280,10 @@ public abstract class SPARQL_REST extend
errorOccurred(ex.getMessage()) ;
return ;
}
-
}
protected static DatasetGraph parseBody(HttpActionREST action)
{
- // DRY - separate out conneg.
- // This is reader code as for client GET.
- // ---- ContentNeg / Webreader.
String contentTypeHeader = action.request.getContentType() ;
if ( contentTypeHeader == null )
errorBadRequest("No content type: "+contentTypeHeader) ;
@@ -307,14 +292,14 @@ public abstract class SPARQL_REST extend
ContentType ct = ContentType.parse(contentTypeHeader) ;
// Use WebContent names
- if ( "multipart/form-data".equalsIgnoreCase(ct.getContentType()) )
+ if ( WebContent.contentTypeMultiForm.equalsIgnoreCase(ct.getContentType()) )
{
//log.warn("multipart/form-data not supported (yet)") ;
error(HttpSC.UNSUPPORTED_MEDIA_TYPE_415, "multipart/form-data not supported") ;
return null ;
}
- if ("multipart/mixed".equals(ct.getContentType()) )
+ if (WebContent.contentTypeMultiMixed.equals(ct.getContentType()) )
{
//log.warn("multipart/mixed not supported") ;
error(HttpSC.UNSUPPORTED_MEDIA_TYPE_415, "multipart/mixed not supported") ;