Class ImageRepository


  • public class ImageRepository
    extends Object
    • Constructor Detail

      • ImageRepository

        public ImageRepository()
    • Method Detail

      • createImageTable

        public static void createImageTable​(int layerId)
                                     throws SQLException,
                                            IOException
        Creates a table that stores images related to a POI of the layer that this table is related to.
        Parameters:
        layerId -
        Throws:
        SQLException
        IOException
      • createImageDiffTable

        public static void createImageDiffTable​(int layerId)
                                         throws SQLException,
                                                IOException
        Creates an image diff table from the structure of an image table. And adds a grpstatus column.
        Parameters:
        dataTable -
        Throws:
        SQLException
        IOException
      • checkImageTableExists

        public static boolean checkImageTableExists​(int layerId)
                                             throws SQLException,
                                                    IOException
        Checks, whether an image table exists for a given layer id.
        Parameters:
        layerId -
        Returns:
        Throws:
        SQLException
        IOException
      • checkImageDiffTableExists

        public static boolean checkImageDiffTableExists​(int layerId)
                                                 throws SQLException,
                                                        IOException
        Checks, if a image diff table exist for a given layer id.
        Parameters:
        layerId -
        Returns:
        Throws:
        SQLException
        IOException
      • getFeatureImagesOrDocuemnts

        public static List<FeatureDocument> getFeatureImagesOrDocuemnts​(de.narimo.commons.dto.geometa.User requestingUser,
                                                                        String workspace,
                                                                        int layerId,
                                                                        int gfid,
                                                                        DocumentType documentType)
                                                                 throws SQLException
        Retrieves a list of documents with related information for each feature.
        Parameters:
        layerId -
        gfid -
        documentType -
        Returns:
        Throws:
        SQLException
        IOException
      • acceptNewImageOrDocument

        public static String acceptNewImageOrDocument​(String imagesTable,
                                                      String diffImagesTable,
                                                      int gfid,
                                                      int diffImageId)
                                               throws IOException
        Accept an image from an images diff table.
        Parameters:
        imagesTable -
        diffImagesTable -
        gfid -
        diffImageId -
        Throws:
        IOException
      • isImageFromFeature

        public static boolean isImageFromFeature​(int layerId,
                                                 int gfid,
                                                 String filename)
                                          throws SQLException,
                                                 IOException
        Check, if there is an image with the given name for the given layer and feature.
        Parameters:
        layerId -
        gfid -
        filename -
        Returns:
        Throws:
        SQLException
        IOException