sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject [sis] 03/04: Remove application/sis-webapp implementation but keep the module for future development. This module has not been maintained for 7 years, still had links to incubator, has been reported to not work anymore (e.g. all links in "sis-location-config.xml" are dead) and is the only module using the QuadTree class, which may need incompatible API changes as warned in its javadoc. This module has been excluded from Apache SIS 1.0 release for above reasons. A reboot of this effort would propably re [...]
Date Tue, 14 Jan 2020 13:29:22 GMT
This is an automated email from the ASF dual-hosted git repository.

desruisseaux pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git

commit 3954de8dffea011b33e8eb80d4aac431c7438fa3
Author: Martin Desruisseaux <martin.desruisseaux@geomatys.com>
AuthorDate: Sat Jan 11 11:26:55 2020 +0100

    Remove application/sis-webapp implementation but keep the module for future development.
    This module has not been maintained for 7 years, still had links to incubator, has been
    reported to not work anymore (e.g. all links in "sis-location-config.xml" are dead) and
    is the only module using the QuadTree class, which may need incompatible API changes as
    warned in its javadoc. This module has been excluded from Apache SIS 1.0 release for
    above reasons. A reboot of this effort would propably require a new analysis of current
    standards, competiting software, etc. JIRA tasks related to this modules are:
    
    - Change the remaining link to incubator
      https://issues.apache.org/jira/browse/SIS-108
    
    - Improve the demo.jsp
      https://issues.apache.org/jira/browse/SIS-36
    
    - Create a Layer Service for Google Earth Integration
      https://issues.apache.org/jira/browse/SIS-28
    
    This removal has been discussed on "dev" mailing list on 2020/01/11.
---
 application/sis-webapp/pom.xml                     |  77 ----
 .../java/org/apache/sis/index/tree/GeoRSSData.java | 177 --------
 .../org/apache/sis/index/tree/QuadTreeReader.java  | 163 -------
 .../org/apache/sis/index/tree/QuadTreeWriter.java  | 164 -------
 .../org/apache/sis/services/LocationServlet.java   | 479 ---------------------
 .../java/org/apache/sis/services/package-info.java |  21 +
 .../src/main/resources/sis-location-config.xml     |  28 --
 .../src/main/webapp/META-INF/context.xml           |   9 +-
 .../sis-webapp/src/main/webapp/WEB-INF/web.xml     |  20 +-
 application/sis-webapp/src/main/webapp/demo.jsp    | 321 --------------
 .../src/main/webapp/images/sis_logo_small.png      | Bin 35560 -> 0 bytes
 ide-project/NetBeans/nbproject/project.properties  |   4 -
 pom.xml                                            |   5 -
 13 files changed, 30 insertions(+), 1438 deletions(-)

diff --git a/application/sis-webapp/pom.xml b/application/sis-webapp/pom.xml
index 5f9957b..1a8ab81 100644
--- a/application/sis-webapp/pom.xml
+++ b/application/sis-webapp/pom.xml
@@ -42,83 +42,6 @@
       <groupId>javax</groupId>
       <artifactId>javaee-api</artifactId>
     </dependency>
-    <dependency>
-      <groupId>org.geonames</groupId>
-      <artifactId>georss-rome</artifactId>
-      <version>0.9.8</version>
-      <!-- We have to specify the version here because georss-rome is intentionally excluded from
-           the dependency management of the root pom.xml. The problem is that the artifact filename
-           is "georss-rome", but the <artifactId> element in its pom.xml declares "georss" without
-           the "-rome" suffix, which causes some environments to complain about this inconsistency.
-           Omitting the declaration from the root pom.xml limits the inconvenience to this "sis-webapp"
-           module only. -->
-    </dependency>
   </dependencies>
 
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>build-helper-maven-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>reserve-ports</id>
-            <phase>pre-integration-test</phase>
-            <goals>
-              <goal>reserve-network-port</goal>
-            </goals>
-            <configuration>
-              <portNames>
-                <portName>jettyPort</portName>
-                <portName>stopPort</portName>
-              </portNames>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.eclipse.jetty</groupId>
-        <artifactId>jetty-maven-plugin</artifactId>
-        <configuration>
-          <stopKey>stopJetty</stopKey>
-          <stopPort>${stopPort}</stopPort>
-          <stopWait>4</stopWait>
-        </configuration>
-        <executions>
-          <execution>
-            <id>start-jetty</id>
-            <phase>pre-integration-test</phase>
-            <goals>
-              <goal>start</goal>
-            </goals>
-            <configuration>
-              <httpConnector>
-                <port>${jettyPort}</port>
-              </httpConnector>
-              <scanIntervalSeconds>0</scanIntervalSeconds>
-              <daemon>true</daemon>
-              <systemProperties>
-                <systemProperty>
-                  <name>org.apache.commons.logging.Log</name>
-                  <value>org.apache.commons.logging.impl.Jdk14Logger</value>
-                </systemProperty>
-                <systemProperty>
-                  <name>java.util.logging.config.file</name>
-                  <value>./src/test/resources/logging.properties</value>
-                </systemProperty>
-              </systemProperties>
-            </configuration>
-          </execution>
-          <execution>
-            <id>stop-jetty</id>
-            <phase>post-integration-test</phase>
-            <goals>
-              <goal>stop</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
-
 </project>
diff --git a/application/sis-webapp/src/main/java/org/apache/sis/index/tree/GeoRSSData.java b/application/sis-webapp/src/main/java/org/apache/sis/index/tree/GeoRSSData.java
deleted file mode 100644
index e2c3277..0000000
--- a/application/sis-webapp/src/main/java/org/apache/sis/index/tree/GeoRSSData.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.sis.index.tree;
-
-//JDK imports
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.util.HashMap;
-
-//SIS imports
-import org.apache.sis.geometry.DirectPosition2D;
-
-//ROME imports
-import com.sun.syndication.feed.module.georss.GeoRSSModule;
-import com.sun.syndication.feed.rss.Item;
-
-/**
- * Implements QuadTreeData to store GeoRSS items into quad tree. Provides
- * methods to save and load GeoRSS items to and from file.
- *
- */
-public class GeoRSSData implements QuadTreeData {
-
-    private String filename;
-    private DirectPosition2D latLon;
-
-    /**
-     * Creates a GeoRSSData object that stores the name of the file that the
-     * entry's information is written to and the geo location of the entry.
-     *
-     * @param filename
-     *            filename where rss entry's info is stored
-     * @param latLon
-     *            geo location of the entry
-     */
-    public GeoRSSData(String filename, DirectPosition2D latLon) {
-        this.filename = filename;
-        this.latLon = latLon;
-    }
-
-    /**
-     * Returns the Java 2D x-coordinate for the longitude.
-     *
-     * @return the Java 2D x-coordinate
-     */
-    public double getX() {
-        return latLon.x + 180.0;
-    }
-
-    /**
-     * Returns the Java 2D y-coordinate for the latitude.
-     *
-     * @return the Java 2D y-coordinate
-     */
-    public double getY() {
-        return latLon.y + 90.0;
-    }
-
-
-    /* (non-Javadoc)
-    * @see org.apache.sis.storage.QuadTreeData#getLatLon()
-    */
-    @Override
-    public DirectPosition2D getLatLon() {
-    return this.latLon;
-    }
-
-    /**
-     * Returns the name of the file where the entry's info is saved.
-     *
-     * @return the name of the file where the entry's info is saved
-     */
-    public String getFileName() {
-        return this.filename;
-    }
-
-    /**
-     * Saves the GeoRSS entry to file.
-     *
-     * @param item
-     *            the Item object from Java ROME API containing the GeoRSS entry
-     * @param geoRSSModule
-     *            the Java ROME API GeoRSSModule to parse geo location
-     * @param directory
-     *            the path of the directory in which to save the file
-     */
-    public void saveToFile(Item item, GeoRSSModule geoRSSModule,
-            String directory) {
-      if (!new File(directory).exists()) new File(directory).mkdirs();
-        try {
-            BufferedWriter writer = new BufferedWriter(new FileWriter(directory
-                    + filename));
-            if (item.getTitle() != null) {
-                writer.write("title;" + item.getTitle().replace('\n', ' '));
-                writer.newLine();
-            }
-            if (item.getLink() != null) {
-                writer.write("link;" + item.getLink().replace('\n', ' '));
-                writer.newLine();
-            }
-            if (item.getSource() != null) {
-                writer.write("source;"
-                        + item.getSource().getValue().replace('\n', ' '));
-                writer.newLine();
-            }
-            if (item.getAuthor() != null) {
-                writer.write("author;" + item.getAuthor().replace('\n', ' '));
-                writer.newLine();
-            }
-            if (item.getDescription() != null) {
-                writer.write("description;"
-                        + item.getDescription().getValue().replace('\n', ' '));
-                writer.newLine();
-            }
-            writer.write("pubDate;" + item.getPubDate().toString());
-            writer.newLine();
-            writer.write("lat;" + geoRSSModule.getPosition().getLatitude());
-            writer.newLine();
-            writer.write("lon;" + geoRSSModule.getPosition().getLongitude());
-            writer.close();
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
-    }
-
-    /**
-     * Reads the file that contains the GeoRSS entry's information and returns a
-     * HashMap of key, value pairs where the key is the name of the element e.g.
-     * title, author.
-     *
-     * @param fullFileName
-     *            the full path to the file
-     * @return HashMap where the key is the name of the element and the value is
-     *         the data inside the element's tag
-     */
-    public static HashMap<String, String> loadFromFile(String fullFileName) {
-        HashMap<String, String> map = new HashMap<String, String>();
-        try {
-            BufferedReader reader = new BufferedReader(new FileReader(
-                    fullFileName));
-            String line = "";
-            while ((line = reader.readLine()) != null) {
-                int delimIndex = line.indexOf(';');
-                if (delimIndex != -1)
-                    map.put(line.substring(0, delimIndex), line.substring(
-                            delimIndex + 1, line.length()));
-            }
-            reader.close();
-        } catch (FileNotFoundException e) {
-            e.printStackTrace();
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
-        return map;
-
-    }
-
-}
diff --git a/application/sis-webapp/src/main/java/org/apache/sis/index/tree/QuadTreeReader.java b/application/sis-webapp/src/main/java/org/apache/sis/index/tree/QuadTreeReader.java
deleted file mode 100644
index 63b1353..0000000
--- a/application/sis-webapp/src/main/java/org/apache/sis/index/tree/QuadTreeReader.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.sis.index.tree;
-
-//JDK imports
-import java.io.BufferedReader;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.IOException;
-
-//SIS imports
-import org.apache.sis.geometry.DirectPosition2D;
-
-/**
- * Class to reload the quad tree index from file.
- *
- */
-public final class QuadTreeReader {
-  private QuadTreeReader() {
-  }
-
-  /**
-   * Loads the quad tree index from file.
-   *
-   * @param directory
-   *          the directory where the index files are located
-   * @param treeConfigFile
-   *          the name of the tree configuration file
-   * @param nodeFile
-   *          the name of the root node file
-   * @return fully loaded QuadTree
-   */
-  public static QuadTree readFromFile(final String directory,
-      final String treeConfigFile, final String nodeFile) {
-    QuadTree tree = new QuadTree();
-    readConfigFromFile(tree, directory, treeConfigFile);
-    readFromFile(tree, tree.getRoot(), directory, nodeFile);
-    return tree;
-  }
-
-  /**
-   * Read the quad tree configuration from file.
-   *
-   *  @param tree
-   *           the quad tree
-   *  @param directory
-   *           the directory where the configuration file is located
-   *  @param treeConfigFile
-   *           the name of the tree configuration file
-   */
-  private static void readConfigFromFile(QuadTree tree, String directory,
-      String treeConfigFile) {
-    try {
-      BufferedReader reader = new BufferedReader(new FileReader(directory
-          + treeConfigFile));
-      String line = "";
-      while ((line = reader.readLine()) != null) {
-        String[] tokens = line.split(";");
-        int capacity = Integer.parseInt(tokens[1]);
-        int depth = Integer.parseInt(tokens[3]);
-        tree.setCapacity(capacity);
-        tree.setDepth(depth);
-      }
-    } catch (FileNotFoundException e1) {
-      e1.printStackTrace();
-    } catch (NumberFormatException e) {
-      e.printStackTrace();
-    } catch (IOException e) {
-      e.printStackTrace();
-    }
-  }
-
-  /**
-   * Read the quad tree index from file.
-   *
-   * @param tree
-   *          the quad tree
-   * @param parent
-   *          the quad tree parent node
-   * @param directory
-   *          the directory where the index files are located
-   * @param filename
-   *          the name of the parent node file
-   */
-  private static void readFromFile(final QuadTree tree,
-      final QuadTreeNode parent, final String directory, final String filename) {
-    try {
-      BufferedReader reader = new BufferedReader(new FileReader(directory
-          + filename));
-      String line = "";
-      while ((line = reader.readLine()) != null) {
-        String[] tokens = line.split(":");
-        Quadrant quadrant = Quadrant.getQuadrant(Integer.parseInt(tokens[0]));
-        String nodetype = tokens[1];
-        int id = Integer.parseInt(tokens[2]);
-
-        if (nodetype.equals("GRAY")) {
-          parent.setChild(new QuadTreeNode(NodeType.GRAY, id), quadrant);
-          tree.setNodeSize(tree.getNodeSize() + 1);
-        } else {
-          int capacity = Integer.parseInt(tokens[3]);
-          parent.setChild(new QuadTreeNode(id, capacity), quadrant);
-          for (int i = 4; i < tokens.length; i++) {
-            String[] dataTokens = tokens[i].split(";");
-            double lat = Double.parseDouble(dataTokens[0]);
-            double lon = Double.parseDouble(dataTokens[1]);
-            parent.getChild(quadrant).addData(
-                new GeoRSSData(dataTokens[2], new DirectPosition2D(lon, lat)));
-            tree.setSize(tree.getSize() + 1);
-          }
-          tree.setNodeSize(tree.getNodeSize() + 1);
-        }
-
-      }
-      reader.close();
-
-      if (parent.getChild(Quadrant.NW) != null
-          && parent.getChild(Quadrant.NW).getNodeType() == NodeType.GRAY) {
-        readFromFile(tree, parent.getChild(Quadrant.NW), directory, "node_"
-            + parent.getChild(Quadrant.NW).getId() + ".txt");
-      }
-
-      if (parent.getChild(Quadrant.NE) != null
-          && parent.getChild(Quadrant.NE).getNodeType() == NodeType.GRAY) {
-        readFromFile(tree, parent.getChild(Quadrant.NE), directory, "node_"
-            + parent.getChild(Quadrant.NE).getId() + ".txt");
-      }
-
-      if (parent.getChild(Quadrant.SW) != null
-          && parent.getChild(Quadrant.SW).getNodeType() == NodeType.GRAY) {
-        readFromFile(tree, parent.getChild(Quadrant.SW), directory, "node_"
-            + parent.getChild(Quadrant.SW).getId() + ".txt");
-      }
-
-      if (parent.getChild(Quadrant.SE) != null
-          && parent.getChild(Quadrant.SE).getNodeType() == NodeType.GRAY) {
-        readFromFile(tree, parent.getChild(Quadrant.SE), directory, "node_"
-            + parent.getChild(Quadrant.SE).getId() + ".txt");
-      }
-
-    } catch (FileNotFoundException e) {
-      e.printStackTrace();
-    } catch (NumberFormatException e) {
-      e.printStackTrace();
-    } catch (IOException e) {
-      e.printStackTrace();
-    }
-  }
-}
diff --git a/application/sis-webapp/src/main/java/org/apache/sis/index/tree/QuadTreeWriter.java b/application/sis-webapp/src/main/java/org/apache/sis/index/tree/QuadTreeWriter.java
deleted file mode 100644
index 6911093..0000000
--- a/application/sis-webapp/src/main/java/org/apache/sis/index/tree/QuadTreeWriter.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.sis.index.tree;
-
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-
-/**
- * Class to save the quad tree index from file.
- *
- * <div class="warning"><b>Note on future work:</b> this class may change in
- * incompatible way in a future Apache SIS release, or may be replaced by new
- * API.</div>
- */
-public final class QuadTreeWriter {
-    private QuadTreeWriter() {
-    }
-
-    /**
-     * Writes the entire quad tree index to file with each node in saved in a
-     * separate file.
-     *
-     * @param tree
-     *            the quad tree
-     * @param directory
-     *            the directory where the index file is located
-     * @throws IOException if an I/O error occurred.
-     */
-    public static void writeTreeToFile(QuadTree tree, String directory) throws IOException {
-        createIdxDir(directory);
-        writeTreeConfigsToFile(tree, directory);
-        writeNodeToFile(tree.getRoot(), directory);
-    }
-
-    /**
-     * Creating quad tree index file.
-     *
-     * @param directory
-     *            the directory where the index file is located
-     */
-    private static void createIdxDir(String directory) {
-        File dir = new File(directory);
-        if (!dir.exists()) {
-            System.out.println("[INFO] Creating qtree idx dir: [" + directory + "]");
-            new File(directory).mkdirs();
-        }
-    }
-
-    /**
-     * Write quad tree configurations to file.
-     *
-     * @param tree
-     *            the quad tree
-     * @param directory
-     *            the directory where the configurations file is located
-     */
-    private static void writeTreeConfigsToFile(QuadTree tree, String directory) throws IOException {
-        try (BufferedWriter writer = new BufferedWriter(new FileWriter(directory + "tree_config.txt"))) {
-            writer.write("capacity;" + tree.getCapacity() + ";depth;" + tree.getDepth());
-            writer.newLine();
-            writer.close();
-        }
-    }
-
-    /**
-     * Write children of the node to index file.
-     *
-     * @param node
-     *            the quad tree node
-     * @param quadrant
-     *            specified quadrant
-     * @param writer
-     *            the BufferedWriter
-     * @param directory
-     *            the directory where the index file is located
-     * @param checkIfParent
-     *            if true, checks if the node's child is not null and is a parent
-     *            if false, only checks if the node's child is not null
-     */
-    private static void writeChildrenToFile(QuadTreeNode node, Quadrant quadrant, BufferedWriter writer, String directory, boolean checkIfParent) throws IOException {
-        if (checkIfParent){
-            if (node.getChild(quadrant) != null && node.getChild(quadrant).getNodeType() == NodeType.GRAY) {
-                writeNodeToFile(node.getChild(quadrant), directory);
-            }
-        } else {
-            if (node.getChild(quadrant) != null) {
-                writer.write(getQuadTreeDataString(quadrant, node.getChild(quadrant)));
-                writer.newLine();
-            }
-        }
-    }
-
-    /**
-     * Write quad tree node to index file if node is a parent.
-     *
-     * @param node
-     *            the quad tree node
-     * @param directory
-     *            the directory where the index file is located
-     */
-    private static void writeNodeToFile(QuadTreeNode node, String directory) throws IOException {
-        try (BufferedWriter writer = new BufferedWriter(new FileWriter(directory + "node_" + node.getId() + ".txt"))){
-            if (node.getNodeType() == NodeType.GRAY) {
-                writeChildrenToFile(node, Quadrant.NW, writer, directory, false);
-                writeChildrenToFile(node, Quadrant.NE, writer, directory, false);
-                writeChildrenToFile(node, Quadrant.SW, writer, directory, false);
-                writeChildrenToFile(node, Quadrant.SE, writer, directory, false);
-            }
-        }
-        if (node.getNodeType() == NodeType.GRAY) {
-            writeChildrenToFile(node, Quadrant.NW, null, directory, true);
-            writeChildrenToFile(node, Quadrant.NE, null, directory, true);
-            writeChildrenToFile(node, Quadrant.SW, null, directory, true);
-            writeChildrenToFile(node, Quadrant.SE, null, directory, true);
-        }
-    }
-
-    /**
-     * Get the quad tree data string
-     *
-     * @param quadrant
-     *            specified quadrant
-     * @param node
-     *            the quad tree node
-     * @return quad tree data string
-     */
-    private static String getQuadTreeDataString(Quadrant quadrant, final QuadTreeNode node) {
-        StringBuilder str = new StringBuilder();
-        str.append(quadrant.index());
-        str.append(':');
-        str.append(node.getNodeType().toString());
-        str.append(':');
-        str.append(node.getId());
-        str.append(':');
-        str.append(node.getCapacity());
-        str.append(':');
-        QuadTreeData[] data = node.getData();
-        for (int i = 0; i < node.getCount(); i++) {
-            str.append(data[i].getLatLon().y);
-            str.append(';');
-            str.append(data[i].getLatLon().x);
-            str.append(';');
-            str.append(data[i].getFileName());
-            str.append(':');
-        }
-        return str.substring(0, str.length() - 1);
-    }
-}
diff --git a/application/sis-webapp/src/main/java/org/apache/sis/services/LocationServlet.java b/application/sis-webapp/src/main/java/org/apache/sis/services/LocationServlet.java
deleted file mode 100644
index d3754f4..0000000
--- a/application/sis-webapp/src/main/java/org/apache/sis/services/LocationServlet.java
+++ /dev/null
@@ -1,479 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.sis.services;
-
-//JDK imports
-import java.awt.geom.Rectangle2D;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.Text;
-import org.xml.sax.SAXException;
-
-import org.opengis.geometry.DirectPosition;
-
-//SIS imports
-import org.apache.sis.geometry.DirectPosition2D;
-import org.apache.sis.geometry.Envelope2D;
-import org.apache.sis.index.tree.GeoRSSData;
-import org.apache.sis.index.tree.QuadTree;
-import org.apache.sis.index.tree.QuadTreeData;
-import org.apache.sis.index.tree.QuadTreeReader;
-import org.apache.sis.index.tree.QuadTreeWriter;
-import org.apache.sis.referencing.GeodeticCalculator;
-import org.apache.sis.referencing.CommonCRS;
-
-//ROME imports
-import com.sun.syndication.feed.WireFeed;
-import com.sun.syndication.feed.module.georss.GeoRSSModule;
-import com.sun.syndication.feed.rss.Channel;
-import com.sun.syndication.feed.rss.Item;
-import com.sun.syndication.io.WireFeedInput;
-import com.sun.syndication.io.XmlReader;
-
-/**
- *
- * A location web service that loads data from GeoRSS format (configured via a
- * provided config.xml file), and then loads up a {@link QuadTree} with this
- * information, making it queryable for callers.
- *
- */
-public class LocationServlet extends HttpServlet {
-
-  private static final long serialVersionUID = 731743219362175102L;
-  private QuadTree tree;
-  private ServletContext context;
-  private String timeToLoad;
-  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();
-    long startTime = 0;
-    long endTime = 0;
-    int capacity = -1, depth = -1;
-    this.qtreeIdxPath = this.context
-        .getInitParameter("org.apache.sis.services.config.qIndexPath");
-    this.georssStoragePath = this.context
-        .getInitParameter("org.apache.sis.services.config.geodataPath");
-
-    if (!this.qtreeIdxPath.endsWith("/"))
-      this.qtreeIdxPath += "/";
-    if (!this.georssStoragePath.endsWith("/"))
-      this.georssStoragePath += "/";
-
-    InputStream indexStream = null;
-    try {
-      indexStream = new FileInputStream(qtreeIdxPath + "node_0.txt");
-    } catch (FileNotFoundException e) {
-      System.out.println("[INFO] Existing qtree index at: ["+qtreeIdxPath+"] not found. Creating new index.");
-    }
-
-    if (indexStream != null) {
-      startTime = System.currentTimeMillis();
-      this.tree = QuadTreeReader.readFromFile(qtreeIdxPath, "tree_config.txt",
-          "node_0.txt");
-      try {
-        indexStream.close();
-      } catch (IOException e) {
-        e.printStackTrace();
-      }
-      endTime = System.currentTimeMillis();
-      this.timeToLoad = "Quad Tree fully loaded from index files in "
-          + Double.toString((endTime - startTime) / 1000L) + " seconds";
-      System.out.println("[INFO] Finished loading tree from stored index");
-    } else {
-      startTime = System.currentTimeMillis();
-      WireFeedInput wf = new WireFeedInput(true);
-      // read quad tree properties set in config xml file
-      InputStream configStream = null;
-      try {
-        configStream = new FileInputStream(this.context
-            .getInitParameter("org.apache.sis.services.config.filePath"));
-      } catch (Exception e) {
-        e.printStackTrace();
-      }
-
-      if (configStream != null) {
-        DocumentBuilderFactory dbfac = DocumentBuilderFactory.newInstance();
-        try {
-          DocumentBuilder docBuilder = dbfac.newDocumentBuilder();
-          Document configDoc = docBuilder.parse(configStream);
-          NodeList capacityNode = configDoc.getElementsByTagName("capacity");
-          if (capacityNode.item(0) != null) {
-            capacity = Integer.parseInt(capacityNode.item(0).getFirstChild()
-                .getNodeValue());
-          }
-
-          NodeList depthNode = configDoc.getElementsByTagName("depth");
-          if (depthNode.item(0) != null) {
-            depth = Integer.parseInt(depthNode.item(0).getFirstChild()
-                .getNodeValue());
-          }
-          this.tree = new QuadTree(capacity, depth); // TODO make this configurable
-
-          NodeList urlNodes = configDoc.getElementsByTagName("url");
-          for (int i = 0; i < urlNodes.getLength(); i++) {
-            // read in georss and build tree
-            String georssUrlStr = urlNodes.item(i).getFirstChild()
-                .getNodeValue();
-            WireFeed feed = null;
-            try {
-              feed = wf.build(new XmlReader(new URL(georssUrlStr)));
-            } catch (Exception e) {
-              System.out.println("[ERROR] Error obtaining geodata url: ["
-                  + georssUrlStr + "]: Message: "+e.getMessage()+": skipping and continuing");
-              continue;
-            }
-
-            Channel c = (Channel) feed;
-            List<Item> items = (List<Item>) c.getItems();
-            for (Item item : items) {
-              GeoRSSModule geoRSSModule = (GeoRSSModule) item
-                  .getModule(GeoRSSModule.GEORSS_GEORSS_URI);
-              if (geoRSSModule == null)
-                geoRSSModule = (GeoRSSModule) item
-                    .getModule(GeoRSSModule.GEORSS_GML_URI);
-              if (geoRSSModule == null)
-                geoRSSModule = (GeoRSSModule) item
-                    .getModule(GeoRSSModule.GEORSS_W3CGEO_URI);
-              // if location from the item cannot be retrieved
-              // then discard it
-              if (geoRSSModule != null && geoRSSModule.getPosition() != null) {
-                String filename = "";
-                if (item.getGuid() != null)
-                  filename = cleanStr(item.getGuid().getValue()) + ".txt";
-                else
-                  filename = cleanStr(item.getLink()) + ".txt";
-
-                GeoRSSData data = new GeoRSSData(filename, new DirectPosition2D(
-                    geoRSSModule.getPosition().getLongitude(),
-                    geoRSSModule.getPosition().getLatitude()));
-                if (this.tree.insert(data)) {
-                  data.saveToFile(item, geoRSSModule, georssStoragePath);
-                } else {
-                  System.out.println("[INFO] Unable to store data at location "
-                      + data.getLatLon().y + ", "
-                      + data.getLatLon().x + " under filename "
-                      + data.getFileName());
-                }
-              }
-            }
-          }
-          configStream.close();
-          endTime = System.currentTimeMillis();
-          this.timeToLoad = "Quad Tree fully loaded from retrieving GeoRSS files over the network in "
-              + Double.toString((endTime - startTime) / 1000L) + " seconds";
-          QuadTreeWriter.writeTreeToFile(tree, qtreeIdxPath);
-        } catch (ParserConfigurationException e) {
-          e.printStackTrace();
-        } catch (SAXException e) {
-          e.printStackTrace();
-        } catch (IOException e) {
-          e.printStackTrace();
-        } catch (IllegalArgumentException e) {
-          e.printStackTrace();
-        }
-      } else {
-        throw new ServletException(
-            "Unable to read location service XML config: null!");
-      }
-    }
-  }
-
-  /**
-   * 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 {
-
-    long beforeTime = 0;
-    long afterTime = 0;
-
-    response.setContentType("text/xml");
-    PrintWriter out = response.getWriter();
-
-    String type = request.getParameter("type");
-
-    List<QuadTreeData> results = new ArrayList<QuadTreeData>();
-    List<String> regions = new ArrayList<String>();
-    if (type != null && type.equals("bbox")) {
-      String llLat = request.getParameter("llLat");
-      String llLon = request.getParameter("llLon");
-      String urLat = request.getParameter("urLat");
-      String urLon = request.getParameter("urLon");
-
-      if (llLat != null && llLon != null && urLat != null && urLon != null) {
-        try {
-          Envelope2D bbox = new Envelope2D(new DirectPosition2D(
-              Double.parseDouble(llLon), Double.parseDouble(llLat)),
-              new DirectPosition2D(Double.parseDouble(urLon), Double.parseDouble(urLat)));
-
-          beforeTime = System.currentTimeMillis();
-          results = tree.queryByBoundingBox(bbox);
-          afterTime = System.currentTimeMillis();
-          // get the polygon that approximates the region
-          Rectangle2D[] rects = bbox.toRectangles();
-          for (int i = 0; i < rects.length; i++) {
-            final Rectangle2D r = rects[i];
-            String regionStr = (r.getMinY()) + "," + (r.getMinX()) + ",";
-            regionStr += (r.getMaxY()) + "," + (r.getMinX()) + ",";
-            regionStr += (r.getMaxY()) + "," + (r.getMaxX()) + ",";
-            regionStr += (r.getMinY()) + "," + (r.getMaxX()) + ",";
-            regionStr += (r.getMinY()) + "," + (r.getMinX());
-            regions.add(regionStr);
-          }
-        } catch (NumberFormatException ex) {
-          System.out
-              .println("[ERROR] Input parameters were not valid latitudes and longitudes");
-        }
-
-      }
-    } else if (type != null && type.equals("pointradius")) {
-      String radius = request.getParameter("radius");
-      String lat = request.getParameter("lat");
-      String lon = request.getParameter("lon");
-
-      if (radius != null && lat != null && lon != null) {
-
-        DirectPosition2D point = null;
-        try {
-          point = new DirectPosition2D(Double.parseDouble(lon), Double.parseDouble(lat));
-        } catch (NumberFormatException ex) {
-          System.out
-              .println("{ERROR] Input parameters were not valid latitudes and longitudes");
-        }
-
-        double radiusKM = Double.parseDouble(radius);
-        final GeodeticCalculator calculator = GeodeticCalculator.create(CommonCRS.SPHERE.geographic());
-        calculator.setStartGeographicPoint(point.y, point.x);
-        calculator.setGeodesicDistance(radiusKM);
-
-        StringBuilder regionStr = new StringBuilder();
-
-        for (int i = 0; i <= 360; i += 10) {
-          calculator.setStartingAzimuth(i);
-          DirectPosition pt = calculator.getEndPoint();
-          regionStr.append(pt.getOrdinate(1)).append(',').append(pt.getOrdinate(0)).append(',');
-        }
-        regions.add(regionStr.substring(0, regionStr.length() - 1));
-
-        beforeTime = System.currentTimeMillis();
-        results = tree.queryByPointRadius(point, radiusKM);
-        afterTime = System.currentTimeMillis();
-
-      }
-    }
-    long timeSeconds = afterTime - beforeTime;
-    // return matches from tree in xml format to client
-    out.write(buildXML(results, regions, timeSeconds));
-    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");
-    PrintWriter out = response.getWriter();
-
-    String filename = request.getParameter("filename");
-
-    if (filename != null) {
-
-      HashMap<String, String> map = GeoRSSData
-          .loadFromFile(this.georssStoragePath + filename);
-      String html = "";
-
-      if (map.get("title") != null && !map.get("title").equals("null")) {
-        html += "<b>Title:&nbsp;</b>" + map.get("title") + "<br />";
-      }
-      if (map.get("link") != null && !map.get("link").equals("null")) {
-        html += "<b>Link:&nbsp;</b><a target='_blank' href='" + map.get("link")
-            + "'" + ">" + map.get("link") + "</a><br />";
-      }
-      if (map.get("author") != null && !map.get("author").equals("null")) {
-        html += "<b>Author:&nbsp;</b>" + map.get("author") + "<br />";
-      }
-      if (map.get("pubDate") != null && !map.get("pubDate").equals("null")) {
-        html += "<b>Pub Date:&nbsp;</b>" + map.get("pubDate") + "<br />";
-      }
-      if (map.get("description") != null
-          && !map.get("description").equals("null")) {
-        html += "<b>Description:&nbsp;</b>" + map.get("description") + "<br />";
-      }
-      html += "<b>Lat:&nbsp;</b>" + map.get("lat") + "<br />";
-      html += "<b>Lon:&nbsp;</b>" + map.get("lon") + "<br />";
-
-      out.write(html);
-
-    }
-    out.close();
-  }
-
-  /**
-   * Builds the XML file to return to client.
-   *
-   * @param filterList
-   *          list of QuadTreeData that are within the search region
-   * @param regions
-   *          the String coordinate representation of the search region
-   * @param time
-   *          the time it took to execute the query
-   * @return XML string
-   */
-  private String buildXML(final List<QuadTreeData> filterList,
-      final List<String> regions, final long time) {
-    DocumentBuilderFactory dbfac = DocumentBuilderFactory.newInstance();
-
-    try {
-      DocumentBuilder docBuilder = dbfac.newDocumentBuilder();
-      Document doc = docBuilder.newDocument();
-
-      Element root = doc.createElement("root");
-      doc.appendChild(root);
-      for (QuadTreeData geo : filterList) {
-        Element item = doc.createElement("item");
-
-        Element id = doc.createElement("id");
-        Text idText = doc.createTextNode(geo.getFileName());
-        id.appendChild(idText);
-        item.appendChild(id);
-
-        Element lat = doc.createElement("lat");
-        Text latText = doc.createTextNode(Double.toString(geo.getLatLon().y));
-        lat.appendChild(latText);
-        item.appendChild(lat);
-
-        Element lon = doc.createElement("lon");
-        Text lonText = doc.createTextNode(Double.toString(geo.getLatLon().x));
-        lon.appendChild(lonText);
-        item.appendChild(lon);
-
-        root.appendChild(item);
-      }
-
-      Element timeElem = doc.createElement("time");
-      Text timeText = doc.createTextNode(Long.toString(time));
-      timeElem.appendChild(timeText);
-      root.appendChild(timeElem);
-
-      if (timeToLoad != null) {
-        Element indexLoadTimeElem = doc.createElement("indexLoadTime");
-        Text indexLoadTimeText = doc.createTextNode(timeToLoad);
-        indexLoadTimeElem.appendChild(indexLoadTimeText);
-        root.appendChild(indexLoadTimeElem);
-        timeToLoad = null; // Only need to send this over to the client
-        // on initial load
-      }
-
-      Element query = doc.createElement("query");
-      root.appendChild(query);
-      for (String rStr : regions) {
-        Element region = doc.createElement("region");
-        Text regionText = doc.createTextNode(rStr);
-        region.appendChild(regionText);
-        query.appendChild(region);
-      }
-      try {
-        TransformerFactory transfac = TransformerFactory.newInstance();
-        Transformer trans = transfac.newTransformer();
-        trans.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no");
-        trans.setOutputProperty(OutputKeys.INDENT, "yes");
-        StringWriter sw = new StringWriter();
-        StreamResult result = new StreamResult(sw);
-        DOMSource source = new DOMSource(doc);
-        trans.transform(source, result);
-        return sw.toString();
-      } catch (TransformerConfigurationException e) {
-        e.printStackTrace();
-      } catch (TransformerException e) {
-        e.printStackTrace();
-      }
-    } catch (ParserConfigurationException e) {
-      e.printStackTrace();
-    }
-    return null;
-
-  }
-
-  /**
-   * Replace all non-alphanumeric characters with empty strings.
-   *
-   * @return String without any non-alphanumeric characters
-   */
-  private static String cleanStr(String id) {
-    String cleanedID = id;
-    return cleanedID.replaceAll("[^a-zA-Z0-9]", "");
-  }
-}
diff --git a/application/sis-webapp/src/main/java/org/apache/sis/services/package-info.java b/application/sis-webapp/src/main/java/org/apache/sis/services/package-info.java
new file mode 100644
index 0000000..25ac794
--- /dev/null
+++ b/application/sis-webapp/src/main/java/org/apache/sis/services/package-info.java
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Place-holder for future web services.
+ */
+package org.apache.sis.services;
diff --git a/application/sis-webapp/src/main/resources/sis-location-config.xml b/application/sis-webapp/src/main/resources/sis-location-config.xml
deleted file mode 100644
index ce58814..0000000
--- a/application/sis-webapp/src/main/resources/sis-location-config.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one or more contributor
-license agreements.  See the NOTICE file distributed with this work for
-additional information regarding copyright ownership.  The ASF licenses this
-file to you under the Apache License, Version 2.0 (the "License"); you may not
-use this file except in compliance with the License.  You may obtain a copy of
-the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
-License for the specific language governing permissions and limitations under
-the License.
--->
-<sis:locationConfig xmlns:sis="http://incubator.apache.org/sis/1.0">
-	<capacity>4</capacity>
-	<depth>10</depth>
-	<url>http://earthquake.usgs.gov/earthquakes/catalogs/shakerss.xml</url>
-	<url>http://www.prh.noaa.gov/ptwc/feeds/ptwc_rss_pacific.xml</url>
-	<url>http://www.prh.noaa.gov/ptwc/feeds/ptwc_rss_hawaii.xml</url>
-	<url>http://www.prh.noaa.gov/ptwc/feeds/ptwc_rss_indian.xml</url>
-	<url>http://www.prh.noaa.gov/ptwc/feeds/ptwc_rss_caribe.xml</url>
-	<url>http://www.bioneural.net/tag/geotag/feed/</url>
-	<url>http://ws.geonames.org/rssToGeoRSS?feedUrl=http://rss.news.yahoo.com/rss/topstories</url>
-</sis:locationConfig>
diff --git a/application/sis-webapp/src/main/webapp/META-INF/context.xml b/application/sis-webapp/src/main/webapp/META-INF/context.xml
index d487191..011866c 100644
--- a/application/sis-webapp/src/main/webapp/META-INF/context.xml
+++ b/application/sis-webapp/src/main/webapp/META-INF/context.xml
@@ -15,15 +15,12 @@ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
 License for the specific language governing permissions and limitations under
 the License.
 -->
+
 <Context path="/sis" docBase="/path/to/sis-webapp-x.y.war">
 
+    <!-- TODO: this file is only a template. Need to be edited. -->
+
     <Parameter name="org.apache.sis.services.config.filePath"
         value="/path/to/sis-location-config.xml" override="false"/>
 
-    <Parameter name="org.apache.sis.services.config.qIndexPath"
-        value="/path/to/qtree/index/dir" override="false"/>
-
-    <Parameter name="org.apache.sis.services.config.geodataPath"
-        value="/path/to/georss/xml/files/dir" override="false"/>
-
 </Context>
diff --git a/application/sis-webapp/src/main/webapp/WEB-INF/web.xml b/application/sis-webapp/src/main/webapp/WEB-INF/web.xml
index 686b0c7..74993a4 100644
--- a/application/sis-webapp/src/main/webapp/WEB-INF/web.xml
+++ b/application/sis-webapp/src/main/webapp/WEB-INF/web.xml
@@ -15,18 +15,10 @@ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
 License for the specific language governing permissions and limitations under
 the License.
 -->
-<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xmlns="http://java.sun.com/xml/ns/javaee"
+         xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+         id="WebApp_ID" version="2.5">
   <display-name>Apache SIS</display-name>
-  <context-param>
-    <param-name>org.apache.sis.services.config.filePath</param-name>
-    <param-value>/path/to/sis-location-config.xml</param-value>
-  </context-param>
-  <servlet>
-    <servlet-name>LocationServlet</servlet-name>
-    <servlet-class>org.apache.sis.services.LocationServlet</servlet-class>
-  </servlet>
-  <servlet-mapping>
-    <servlet-name>LocationServlet</servlet-name>
-    <url-pattern>/location</url-pattern>
-  </servlet-mapping>
-</web-app>
\ No newline at end of file
+</web-app>
diff --git a/application/sis-webapp/src/main/webapp/demo.jsp b/application/sis-webapp/src/main/webapp/demo.jsp
deleted file mode 100644
index 9b2c18d..0000000
--- a/application/sis-webapp/src/main/webapp/demo.jsp
+++ /dev/null
@@ -1,321 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
- -->
-<html>
-<head>
-<title>Apache SIS Spatial Query Demo with Quad Tree Storage and Leaflet Maps
-API</title>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
-<link rel="stylesheet" href="http://leaflet.cloudmade.com/dist/leaflet.css" />
-<!--[if lte IE 8]>
-<link rel="stylesheet" href="http://leaflet.cloudmade.com/dist/leaflet.ie.css" />
-<![endif]-->
-<style type="text/css">
-html {
-	height: 80%
-}
-
-body {
-	height: 100%;
-	font-family: arial, Sans-serif;
-	font-size: 12px;
-}
-
-#map_canvas {
-	height: 80%;
-	width: 50%;
-	font-size: 10px;
-}
-
-#result {
-	font-color: #808080;
-	font-size: 10px;
-}
-
-.center {
-	margin-left: auto;
-	margin-right: auto;
-	width: 50%;
-}
-.leaflet-popup-content {
-	height:200px;
-	width:200px;
-	overflow:auto;
-}
-</style>
-<script type="text/javascript"
-	src="http://leaflet.cloudmade.com/dist/leaflet.js"></script>
-
-<script type="text/javascript">
-	var map;
-	var req;
-
-	function initialize() {
-		map = new L.Map('map_canvas', {scrollWheelZoom:false});
-		var tileURL = 'http://{s}.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.png';
-		var tileAttribution = 'Basemap <a href="http://creativecommons.org/licenses/by-sa/2.0/" target="_blank">CC-BY-SA</a> by &copy; <a href="http://openstreetmap.org/" target="_blank">OpenStreetMap</a>, Tiles Courtesy of &copy; <a href="http://open.mapquest.com" target="_blank">MapQuest</a>';
-		var tileLayer = new L.TileLayer(tileURL, {minZoom: 1, attribution: tileAttribution, subdomains: ['otile1','otile2','otile3','otile4']});
-		map.setView(new L.LatLng(0, 0), 1).addLayer(tileLayer);
-
-		//get the query string
-		var queryStr = window.location.search.substring(1);
-		var queryStrSplit = queryStr.split("&");
-		for (var i = 0; i < queryStrSplit.length; i++)
-		{
-			var keyValue = queryStrSplit[i].split("=");
-			if (keyValue[0] == "type")
-			{
-				document.getElementById("type").value = keyValue[1];
-				switchType();
-			}
-			else if (keyValue[0] == "llLat")
-				document.getElementById("llLat").value = keyValue[1];
-			else if (keyValue[0] == "llLon")
-				document.getElementById("llLon").value = keyValue[1];
-			else if (keyValue[0] == "urLat")
-				document.getElementById("urLat").value = keyValue[1];
-			else if (keyValue[0] == "urLon")
-				document.getElementById("urLon").value = keyValue[1];
-			else if (keyValue[0] == "lat")
-				document.getElementById("lat").value = keyValue[1];
-			else if (keyValue[0] == "lon")
-				document.getElementById("lon").value = keyValue[1];
-			else if (keyValue[0] == "radius")
-				document.getElementById("radius").value = keyValue[1];
-		}
-
-		if (queryStr != "") {
-			getXMLDoc("location?" + queryStr);
-		}
-	}
-
-	function getXMLDoc(url) {
-		req = false;
-
-		if (window.XMLHttpRequest) {
-			try {
-				req = new XMLHttpRequest();
-			} catch (e) {
-				req = false;
-			}
-		} else if (window.ActiveXObject) {
-			try {
-				req = new ActiveXObject("Msxml2.XMLHTTP");
-			} catch (e) {
-				try {
-					req = new ActiveXObject("Microsoft.XMLHTTP");
-				} catch (e) {
-					req = false;
-				}
-			}
-		}
-		if (req) {
-			req.onreadystatechange = processXMLDoc;
-			req.open("GET", url, true);
-			req.send("");
-		}
-	}
-
-	function processXMLDoc() {
-		if (req.readyState == 4) {
-			if (req.status == 200) {
-				var xmlDoc = req.responseXML;
-				var ids = xmlDoc.getElementsByTagName("id");
-				var lats = xmlDoc.getElementsByTagName("lat");
-				var lons = xmlDoc.getElementsByTagName("lon");
-				var regions = xmlDoc.getElementsByTagName("region");
-				var time = xmlDoc.getElementsByTagName("time");
-
-				var indexLoadTime = xmlDoc.getElementsByTagName("indexLoadTime");
-				if (indexLoadTime != null && indexLoadTime.length == 1) {
-					alert(indexLoadTime[0].firstChild.nodeValue);
-				}
-
-				document.getElementById("result").innerHTML = ids.length + " results (" + ( parseInt(time[0].firstChild.nodeValue)  / 1000 ) + " seconds)";
-
-				for ( var i = 0; i < ids.length; i++) {
-					var latLon = new L.LatLng(
-							parseFloat(lats[i].firstChild.nodeValue),
-							parseFloat(lons[i].firstChild.nodeValue));
-
-					var filename = ids[i].firstChild.nodeValue;
-					var marker = createMarker(latLon, filename);
-				}
-
-				for (var j = 0; j < regions.length; j++)
-				{
-					var regionStr = regions[j].firstChild.nodeValue;
-					var latLonPairs = regionStr.split(",");
-					var regionCoordinates = [];
-					for (var k = 0; k < latLonPairs.length; k+=2)
-					{
-						var lon = latLonPairs[k+1];
-						if (lon == 180.0)
-							lon = 179.99;
-						var point = new L.LatLng(latLonPairs[k], lon);
-						regionCoordinates.push(point);
-					}
-					var polygon = new L.Polygon(regionCoordinates, {weight:2, opacity:0.8, clickable:false});
-					map.addLayer(polygon);
-				}
-			} else {
-				alert("Error retrieving results from server: " + req.statusText);
-			}
-		}
-	}
-	var globalMarker;
-	function getHTMLDescription(filename, marker) {
-		req = false;
-
-		if (window.XMLHttpRequest) {
-			try {
-				req = new XMLHttpRequest();
-			} catch (e) {
-				req = false;
-			}
-		} else if (window.ActiveXObject) {
-			try {
-				req = new ActiveXObject("Msxml2.XMLHTTP");
-			} catch (e) {
-				try {
-					req = new ActiveXObject("Microsoft.XMLHTTP");
-				} catch (e) {
-					req = false;
-				}
-			}
-		}
-		if (req) {
-			globalMarker = marker;
-			req.onreadystatechange = displayMarker;
-			req.open("POST", "location", true);
-			req.setRequestHeader("Content-type","application/x-www-form-urlencoded");
-			req.send("filename=" + filename);
-		}
-	}
-
-	function createMarker(latLon, filename) {
-		var marker = new L.Marker(latLon);
-		map.addLayer(marker);
-		marker.on('click', function(event)
-		{
-			getHTMLDescription(filename, marker);
-		});
-		return marker;
-	}
-
-	function displayMarker()
-	{
-		if (req.readyState == 4) {
-			if (req.status == 200) {
-				var text = req.responseText;
-				globalMarker.bindPopup(text).openPopup();
-			}
-		}
-	}
-
-	function switchType()
-	{
-
-		if (document.getElementById("type").selectedIndex == 0)
-		{
-			document.getElementById("bbox").style.visibility = "visible";
-			document.getElementById("bbox").style.display = "block";
-			document.getElementById("pointradius").style.visibility = "hidden";
-			document.getElementById("pointradius").style.display = "none";
-		}
-		else
-		{
-			document.getElementById("bbox").style.visibility = "hidden";
-			document.getElementById("bbox").style.display = "none";
-			document.getElementById("pointradius").style.visibility = "visible";
-			document.getElementById("pointradius").style.display = "block";
-		}
-	}
-
-	function validate() {
-		var regex = /-?[0-9]+.?[0-9]*/;
-		if (document.getElementById("type").selectedIndex == 0) {
-			if (document.getElementById("llLat").value.match(regex)
-					&& document.getElementById("llLon").value.match(regex)
-					&& document.getElementById("urLat").value.match(regex)
-					&& document.getElementById("urLon").value.match(regex)) {
-				return true;
-			} else {
-				alert("Enter valid lat/lon values in corresponding fields.");
-				return false;
-			}
-		} else if (document.getElementById("type").selectedIndex == 1) {
-			if (document.getElementById("lat").value.match(regex)
-					&& document.getElementById("lon").value.match(regex)
-					&& document.getElementById("radius").value.match(regex)) {
-				return true;
-			} else {
-				alert("Enter valid lat/lon and radius values in corresponding fields.");
-				return false;
-			}
-		}
-
-	}
-</script>
-</head>
-<body onload="initialize()">
-<div class="center" ><a href="http://sis.apache.org"><image src="images/sis_logo_small.png" alt="Apache SIS: Spatial Information System" border="0"/></a></div>
-<form method="get"
-	onsubmit="return validate()" class="center">
-
-<label><b>Query By&nbsp;</b></label> <select id="type"
-	onchange="switchType()" name="type">
-	<option value="bbox">Bounding Box</option>
-	<option value="pointradius">Point-Radius</option>
-</select></p>
-<span id="bbox">
-<table cellpadding="5" cellspacing="5">
-	<tr>
-		<td><b>Lower Left</b></td>
-		<td>Latitude&nbsp;<input id="llLat" type="text" size="8"
-			name="llLat" /></td>
-
-		<td>Longitude&nbsp;<input id="llLon" type="text" size="8"
-			name="llLon" /></td>
-	</tr>
-	<tr>
-		<td><b>Upper Right</b></td>
-		<td>Latitude&nbsp;<input id="urLat" type="text" size="8"
-			name="urLat" /></td>
-		<td>Longitude&nbsp;<input id="urLon" type="text" size="8"
-			name="urLon" /></td>
-	</tr>
-</table>
-</span> <span id="pointradius" style="display: none; visibility: hidden;">
-<table cellpadding="5" cellspacing="5]">
-	<tr>
-		<td>Latitude&nbsp;<input id="lat" type="text" size="8" name="lat" /></td>
-
-		<td>Longitude&nbsp;<input id="lon" type="text" size="8"
-			name="lon" /></td>
-		<td>Radius (km)&nbsp;<input id="radius" type="text" size="8"
-			name="radius" /></td>
-	</tr>
-</table>
-</span>
-<p><input type="submit" value="Query" /></p>
-</form>
-<p id="result" class="center"></p>
-<div id="map_canvas" class="center"></div>
-</body>
-</html>
\ No newline at end of file
diff --git a/application/sis-webapp/src/main/webapp/images/sis_logo_small.png b/application/sis-webapp/src/main/webapp/images/sis_logo_small.png
deleted file mode 100644
index 13d60a7..0000000
Binary files a/application/sis-webapp/src/main/webapp/images/sis_logo_small.png and /dev/null differ
diff --git a/ide-project/NetBeans/nbproject/project.properties b/ide-project/NetBeans/nbproject/project.properties
index 70c2c30..d06b926 100644
--- a/ide-project/NetBeans/nbproject/project.properties
+++ b/ide-project/NetBeans/nbproject/project.properties
@@ -113,8 +113,6 @@ geographlib.version  = 1.50
 guava.version        = 27.0.1-jre
 esri.api.version     = 2.2.3
 jts.version          = 1.16.1
-georss.version       = 0.9.8
-rome.version         = 0.9
 jdom1.version        = 1.0
 jdom2.version        = 2.0.4
 jee.version          = 8.0.1
@@ -144,8 +142,6 @@ javac.classpath=\
     ${maven.repository}/jakarta/xml/bind/jakarta.xml.bind-api/${jaxb.version}/jakarta.xml.bind-api-${jaxb.version}.jar:\
     ${maven.repository}/com/esri/geometry/esri-geometry-api/${esri.api.version}/esri-geometry-api-${esri.api.version}.jar:\
     ${maven.repository}/org/locationtech/jts/jts-core/${jts.version}/jts-core-${jts.version}.jar:\
-    ${maven.repository}/org/geonames/georss-rome/${georss.version}/georss-rome-${georss.version}.jar:\
-    ${maven.repository}/rome/rome/${rome.version}/rome-${rome.version}.jar:\
     ${maven.repository}/jdom/jdom/${jdom1.version}/jdom-${jdom1.version}.jar:\
     ${maven.repository}/javax/javaee-api/${jee.version}/javaee-api-${jee.version}.jar:\
     ${maven.repository}/edu/ucar/cdm/${netcdf.version}/cdm-${netcdf.version}.jar:\
diff --git a/pom.xml b/pom.xml
index 9355144..f43d9b7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -983,11 +983,6 @@
           <artifactId>maven-deploy-plugin</artifactId>
           <version>3.0.0-M1</version>
         </plugin>
-        <plugin>
-          <groupId>org.eclipse.jetty</groupId>
-          <artifactId>jetty-maven-plugin</artifactId>
-          <version>9.4.20.v20190813</version>
-        </plugin>
       </plugins>
     </pluginManagement>
   </build>


Mime
View raw message