Interface IImageDBCreator

  • All Known Implementing Classes:
    ImageDBCreator

    public interface IImageDBCreator
    This is the public interface for classes used to create a database storing images and various descriptors for images.
    Author:
    Dustin Kempton, Data Mining Lab, Georgia State University
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean checkImagesExist​(int id, org.joda.time.Interval period)
      A function that checks the database to see if the images are in the database for the passed in identifier.
      boolean checkParamsExist​(int id, org.joda.time.Interval period)
      A function that checks the database to see if the parameters are in the database for the passed in identifier.
      int insertFileDescript​(Waveband wavelength, org.joda.time.Interval period)
      Inserts the descriptor for a particular image.
      boolean insertFileDescriptTables​(org.joda.time.Interval period)
      Creates the tables for holding images and image parameter data for the month represented by the start of the passed in interval.
      void insertHeader​(ImageDBFitsHeaderData header, int id, org.joda.time.Interval period)
      Inserts the fits header information for the image matching the description id.
      void insertImage​(BufferedImage file, int id, org.joda.time.Interval period)
      Inserts the image for a given descriptor.
      void insertImageSparseVect​(smile.math.matrix.SparseMatrix[] vectors, int id, org.joda.time.Interval period)
      Inserts the image descriptor vectors for the image matching the description id.
      void insertParams​(double[][][] params, int id, org.joda.time.Interval period)
      Inserts the image parameters for the image matching the description id.
    • Method Detail

      • insertFileDescriptTables

        boolean insertFileDescriptTables​(org.joda.time.Interval period)
                                  throws SQLException
        Creates the tables for holding images and image parameter data for the month represented by the start of the passed in interval.
        Parameters:
        period - The period that the table corresponds with
        Returns:
        True if table was created, else False.
        Throws:
        SQLException - If something went wrong with the connection.
      • insertFileDescript

        int insertFileDescript​(Waveband wavelength,
                               org.joda.time.Interval period)
                        throws SQLException
        Inserts the descriptor for a particular image.
        Parameters:
        wavelength - The wavelength of the image to be stored
        period - The period of time that the image corresponds to.
        Returns:
        The id for the image description
        Throws:
        SQLException - If the operation fails.
      • insertImage

        void insertImage​(BufferedImage file,
                         int id,
                         org.joda.time.Interval period)
                  throws SQLException,
                         IOException
        Inserts the image for a given descriptor.
        Parameters:
        file - The file containing the image.
        id - The id of the image descriptor.
        period - The period that the image corresponds to. This is used to determine which table to insert into, so it only needs to be in the same month.
        Throws:
        SQLException - If the operation files.
        IOException
      • insertParams

        void insertParams​(double[][][] params,
                          int id,
                          org.joda.time.Interval period)
                   throws SQLException
        Inserts the image parameters for the image matching the description id.
        Parameters:
        params - The matrix containing the calculated image parameters.
        id - The id of the image descriptor.
        period - The period that the image corresponds to. This is used to determine which table to insert into, so it only needs to be in the same month.
        Throws:
        SQLException - If the operation fails.
      • insertImageSparseVect

        void insertImageSparseVect​(smile.math.matrix.SparseMatrix[] vectors,
                                   int id,
                                   org.joda.time.Interval period)
                            throws SQLException
        Inserts the image descriptor vectors for the image matching the description id.
        Parameters:
        vectors - Vectors used to describe the image.
        id - The id of the image that the vectors describe.
        period - The period that the image corresponds to. This is used to determine which table to insert into, so it only needs to be in the same month.
        Throws:
        SQLException - If the operation fails.
      • insertHeader

        void insertHeader​(ImageDBFitsHeaderData header,
                          int id,
                          org.joda.time.Interval period)
                   throws SQLException
        Inserts the fits header information for the image matching the description id.
        Parameters:
        header - The fits header data to insert.
        id - The id of the image descriptor.
        period - The period that the image corresponds to. This is used to determine which table to insert into, so it only needs to be in the same month.
        Throws:
        SQLException - If the operation fails.
      • checkParamsExist

        boolean checkParamsExist​(int id,
                                 org.joda.time.Interval period)
                          throws SQLException
        A function that checks the database to see if the parameters are in the database for the passed in identifier.
        Parameters:
        id - Identifier that shall be checked against.
        period - The month that the image corresponds to.
        Returns:
        True if there, false otherwise.
        Throws:
        SQLException - If the operation fails.
      • checkImagesExist

        boolean checkImagesExist​(int id,
                                 org.joda.time.Interval period)
                          throws SQLException
        A function that checks the database to see if the images are in the database for the passed in identifier.
        Parameters:
        id - Identifier that shall be checked against.
        period - The month that the image corresponds to.
        Returns:
        True if there, false otherwise.
        Throws:
        SQLException - If the operation fails.