Return-Path: X-Original-To: apmail-incubator-sis-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-sis-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8278992B9 for ; Sat, 31 Mar 2012 03:44:32 +0000 (UTC) Received: (qmail 13177 invoked by uid 500); 31 Mar 2012 03:44:32 -0000 Delivered-To: apmail-incubator-sis-commits-archive@incubator.apache.org Received: (qmail 13141 invoked by uid 500); 31 Mar 2012 03:44:32 -0000 Mailing-List: contact sis-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: sis-dev@incubator.apache.org Delivered-To: mailing list sis-commits@incubator.apache.org Received: (qmail 13134 invoked by uid 99); 31 Mar 2012 03:44:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 31 Mar 2012 03:44:32 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 31 Mar 2012 03:44:30 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id BD40B2388AF0; Sat, 31 Mar 2012 03:44:10 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1307711 - in /incubator/sis/trunk: CHANGES.txt sis-webapp/src/main/java/org/apache/sis/services/LocationServlet.java Date: Sat, 31 Mar 2012 03:44:10 -0000 To: sis-commits@incubator.apache.org From: mattmann@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120331034410.BD40B2388AF0@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: mattmann Date: Sat Mar 31 03:44:10 2012 New Revision: 1307711 URL: http://svn.apache.org/viewvc?rev=1307711&view=rev Log: - fix for SIS-40: Add the missing documentation comments for SIS WS layer contributed by Charitha Madusanka Modified: incubator/sis/trunk/CHANGES.txt incubator/sis/trunk/sis-webapp/src/main/java/org/apache/sis/services/LocationServlet.java Modified: incubator/sis/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/incubator/sis/trunk/CHANGES.txt?rev=1307711&r1=1307710&r2=1307711&view=diff ============================================================================== --- incubator/sis/trunk/CHANGES.txt (original) +++ incubator/sis/trunk/CHANGES.txt Sat Mar 31 03:44:10 2012 @@ -3,6 +3,9 @@ Apache SIS Change Log Release 0.3-incubating - Current Development +* SIS-40 Add the missing documentation comments for SIS + WS layer (Charitha Madusanka via mattmann) + * SIS-38 Add the missing documentation comments for SIS-core storage (Charitha Madusanka via mattmann) Modified: incubator/sis/trunk/sis-webapp/src/main/java/org/apache/sis/services/LocationServlet.java URL: http://svn.apache.org/viewvc/incubator/sis/trunk/sis-webapp/src/main/java/org/apache/sis/services/LocationServlet.java?rev=1307711&r1=1307710&r2=1307711&view=diff ============================================================================== --- incubator/sis/trunk/sis-webapp/src/main/java/org/apache/sis/services/LocationServlet.java (original) +++ incubator/sis/trunk/sis-webapp/src/main/java/org/apache/sis/services/LocationServlet.java Sat Mar 31 03:44:10 2012 @@ -85,6 +85,15 @@ public class LocationServlet extends Htt private String qtreeIdxPath; private String georssStoragePath; + /** + * Read GeoRSS data (location information provide sis-location-config.xml ) + * and build quad-tree. + * + * @param config + * Servlet configuration file + * @exception ServletException + * General exception for servlet + */ @SuppressWarnings("unchecked") public void init(ServletConfig config) throws ServletException { this.context = config.getServletContext(); @@ -115,7 +124,6 @@ public class LocationServlet extends Htt try { indexStream.close(); } catch (IOException e) { - // TODO Auto-generated catch block e.printStackTrace(); } endTime = System.currentTimeMillis(); @@ -207,16 +215,12 @@ public class LocationServlet extends Htt + Double.toString((endTime - startTime) / 1000L) + " seconds"; QuadTreeWriter.writeTreeToFile(tree, qtreeIdxPath); } catch (ParserConfigurationException e) { - // TODO Auto-generated catch block e.printStackTrace(); } catch (SAXException e) { - // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { - // TODO Auto-generated catch block e.printStackTrace(); } catch (IllegalArgumentException e) { - // TODO Auto-generated catch block e.printStackTrace(); } } else { @@ -226,6 +230,19 @@ public class LocationServlet extends Htt } } + /** + * Provide GET requests for Bounding-box and Point-radius search queries. + * Return search results to client in xml format. + * + * @param request + * Http Servlet Request + * @param response + * Http Servlet Response + * @exception ServletException + * General exception for servlet + * @exception IOException + * General exception for I/O + */ public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { @@ -316,6 +333,18 @@ public class LocationServlet extends Htt out.close(); } + /** + * Provide Post requests for build GeoRSS data html file. + * + * @param request + * Http Servlet Request + * @param response + * Http Servlet Response + * @exception ServletException + * General exception for servlet + * @exception IOException + * General exception for I/O + */ public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); @@ -432,20 +461,23 @@ public class LocationServlet extends Htt trans.transform(source, result); return sw.toString(); } catch (TransformerConfigurationException e) { - // TODO Auto-generated catch block e.printStackTrace(); } catch (TransformerException e) { - // TODO Auto-generated catch block e.printStackTrace(); } } catch (ParserConfigurationException e) { - // TODO Auto-generated catch block e.printStackTrace(); } return null; } + /** + * Replace all non-alphanumeric characters with empty strings. + * + * @param id + * @return String without any non-alphanumeric characters + */ private static String cleanStr(String id) { String cleanedID = id; return cleanedID.replaceAll("[^a-zA-Z0-9]", "");