Class GeorepoTools


  • public class GeorepoTools
    extends Object
    • Constructor Detail

      • GeorepoTools

        public GeorepoTools()
    • Method Detail

      • importGeoCSV

        public static javax.ws.rs.core.Response importGeoCSV​(javax.servlet.ServletContext context,
                                                             String geoserverDataDir,
                                                             String sridAsString,
                                                             String delimiter,
                                                             String csvFileName,
                                                             String readableLayerName,
                                                             String workspace,
                                                             String[] optColumnTypes)
                                                      throws Exception
        Throws:
        Exception
      • importEmptyLayer

        public static javax.ws.rs.core.Response importEmptyLayer​(javax.servlet.ServletContext context,
                                                                 String sridAsString,
                                                                 String readableLayerName,
                                                                 String workspace,
                                                                 String[] columnHeaders,
                                                                 String[] columnTypes)
                                                          throws Exception
        Throws:
        Exception
      • replaceGeoCSVLayer

        public static javax.ws.rs.core.Response replaceGeoCSVLayer​(javax.servlet.ServletContext context,
                                                                   String geoserverDataDir,
                                                                   String sridAsString,
                                                                   String delimiter,
                                                                   String csvFileName,
                                                                   String workspace,
                                                                   String optColumnTypes,
                                                                   int layerId)
                                                            throws Exception
        Throws:
        Exception
      • importShape

        public static javax.ws.rs.core.Response importShape​(javax.servlet.ServletContext context,
                                                            String geoserverDataDir,
                                                            String sridAsString,
                                                            String shpFileName,
                                                            String readableLayerName,
                                                            String[] optColumnTypes)
                                                     throws IOException
        Deprecated.
        not up to date. see importGeoCSV
        Parameters:
        geoserverDataDir -
        sridAsString -
        shpFileName -
        readableLayerName -
        Returns:
        Throws:
        Exception
        IOException
      • getFileExtension

        public static String getFileExtension​(String absFileName)
        Returns the extension of a file as after the last ".".
        Parameters:
        absFileName -
        Returns:
      • normalize

        public static String normalize​(String input)
                                throws IOException
        Removes special chars, retains underscore. Converts space, tab and linebreak to underscore. Converts umlaute. Converts to lower case. TODO: what about diacritics?
        Parameters:
        inputz -
        Returns:
        Throws:
        IOException
      • isAlphaNumeric

        public static boolean isAlphaNumeric​(String s)
        Checks a string for only occurrences of alphanumeric characters including underscore.
        Parameters:
        s -
        Returns: