Class DatasetRepository

    • Constructor Detail

      • DatasetRepository

        public DatasetRepository()
    • Method Detail

      • getDatasets

        public static org.geotools.feature.FeatureCollection getDatasets​(int layerId,
                                                                         long userId,
                                                                         boolean asAdmin)
                                                                  throws SQLException
        Throws:
        SQLException
      • getLayerId

        public static int getLayerId​(String workspace,
                                     String featureType)
      • doesFeatureExist

        public static boolean doesFeatureExist​(int layerId,
                                               int gfid)
                                        throws SQLException
        Checks, whether a feature with gfid exists for the given layer.
        Parameters:
        layerId -
        gfid -
        Returns:
        Throws:
        SQLException
        IOException
      • checkTagTableExists

        public static boolean checkTagTableExists​(int layerId)
                                           throws SQLException
        Throws:
        SQLException
      • checkAuthTableExists

        public static boolean checkAuthTableExists​(int layerId)
                                            throws SQLException
        Throws:
        SQLException
      • addTags

        public static List<String> addTags​(int layerId,
                                           int gfid,
                                           List<String> tags)
                                    throws SQLException
        Add one or multiple tags for a gfid on a layer.
        Parameters:
        layerId -
        gfid -
        tags -
        Returns:
        Throws:
        SQLException
      • removeTags

        public static List<String> removeTags​(int layerId,
                                              int gfid,
                                              List<String> tags)
                                       throws SQLException
        Remove one or multiple tags from a gfid on a layer.
        Parameters:
        layerId -
        gfid -
        tags -
        Returns:
        Throws:
        SQLException
      • getDatasetHistory

        public static org.geotools.feature.FeatureCollection getDatasetHistory​(int layerId,
                                                                               long userId,
                                                                               int gfid)
                                                                        throws SQLException
        Retrieves the history datasets of a feature for a given gfid ordered by insertedat date descending (newest first).
        Parameters:
        layerId -
        userId -
        Returns:
        Throws:
        SQLException