sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mattm...@apache.org
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 GMT
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]", "");



Mime
View raw message