From: <tho...@us...> - 2013-11-13 17:37:19
|
Revision: 7545 http://bigdata.svn.sourceforge.net/bigdata/?rev=7545&view=rev Author: thompsonbry Date: 2013-11-13 17:37:13 +0000 (Wed, 13 Nov 2013) Log Message: ----------- Override annotations. made some methods static. Modified Paths: -------------- branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/DeleteServlet.java branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/InsertServlet.java branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/QueryServlet.java branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/UpdateServlet.java Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/DeleteServlet.java =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/DeleteServlet.java 2013-11-13 17:34:59 UTC (rev 7544) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/DeleteServlet.java 2013-11-13 17:37:13 UTC (rev 7545) @@ -36,7 +36,6 @@ import org.openrdf.model.Statement; import org.openrdf.model.URI; import org.openrdf.model.Value; -import org.openrdf.model.impl.URIImpl; import org.openrdf.rio.RDFFormat; import org.openrdf.rio.RDFHandlerException; import org.openrdf.rio.RDFParser; @@ -414,6 +413,7 @@ } } + @Override public void handleStatement(final Statement stmt) throws RDFHandlerException { Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/InsertServlet.java =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/InsertServlet.java 2013-11-13 17:34:59 UTC (rev 7544) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/InsertServlet.java 2013-11-13 17:37:13 UTC (rev 7545) @@ -546,6 +546,7 @@ } } + @Override public void handleStatement(final Statement stmt) throws RDFHandlerException { Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/QueryServlet.java =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/QueryServlet.java 2013-11-13 17:34:59 UTC (rev 7544) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/QueryServlet.java 2013-11-13 17:37:13 UTC (rev 7545) @@ -658,17 +658,19 @@ * linked data GET by turning it into a SPARQL DESCRIBE query. * @throws IOException */ - private String getQueryString(final HttpServletRequest req) throws IOException { - if (RESTServlet.hasMimeType(req, MIME_SPARQL_QUERY)) { - // return the body of the POST, see trac 711 - return readFully( req.getReader() ); - } - return req.getParameter(ATTR_QUERY) != null ? req + static private String getQueryString(final HttpServletRequest req) + throws IOException { + if (RESTServlet.hasMimeType(req, MIME_SPARQL_QUERY)) { + // return the body of the POST, see trac 711 + return readFully(req.getReader()); + } + return req.getParameter(ATTR_QUERY) != null ? req .getParameter(ATTR_QUERY) : (String) req .getAttribute(ATTR_QUERY); - } - - private String getUpdateString(final HttpServletRequest req) throws IOException { + } + + static private String getUpdateString(final HttpServletRequest req) + throws IOException { if (RESTServlet.hasMimeType(req, MIME_SPARQL_UPDATE)) { // return the body of the POST, see trac 711 return readFully( req.getReader() ); @@ -676,9 +678,10 @@ return req.getParameter(ATTR_UPDATE); } - static String readFully(Reader reader) throws IOException { - char[] arr = new char[8*1024]; // 8K at a time - StringBuffer buf = new StringBuffer(); + // Note: Referenced by the test suite. Should be moved to utility class. + static String readFully(final Reader reader) throws IOException { + final char[] arr = new char[8*1024]; // 8K at a time + final StringBuffer buf = new StringBuffer(); int numChars; while ((numChars = reader.read(arr, 0, arr.length)) > 0) { Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/UpdateServlet.java =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/UpdateServlet.java 2013-11-13 17:34:59 UTC (rev 7544) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/UpdateServlet.java 2013-11-13 17:37:13 UTC (rev 7545) @@ -355,7 +355,7 @@ if (ServletFileUpload.isMultipartContent(req)) { - doUpdateWithBody(req, resp); + doUpdateWithBody(req, resp); } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |