Class HelioviewerPullingAIAImageDBConnection

  • All Implemented Interfaces:
    ISTImageDBConnection

    public class HelioviewerPullingAIAImageDBConnection
    extends ImageDBConnection
    This class extends the ImageDBConnection to pull images that are not in the database already, from the Helioviewer API. It then converts the downloaded image from the JP2 format that is provided by the Helioviewer API to a JPEG format that is stored in the database that this class is connected to.
    Author:
    Dustin Kempton, Data Mining Lab, Georgia State University
    • Field Detail

      • certificateString

        public static String certificateString
    • Constructor Detail

      • HelioviewerPullingAIAImageDBConnection

        public HelioviewerPullingAIAImageDBConnection​(DataSource dsourc,
                                                      IImageDBCreator creator,
                                                      IImgParamNormalizer normalizer,
                                                      org.slf4j.Logger logger,
                                                      int maxCacheSize)
        Constructor that assumes default values for parameter down sample and the number of parameters for each image cell. Those values are a division by 64 for all coordinates of input events, and 10 image parameters per cell location.
        Parameters:
        dsourc - The data source connection that is used to connect to the database.
        creator - The image DB creator object used to insert images and metadata into the tables used to store this information.
        normalizer - The image parameter normalizer, can be null, and if it is, then no normalization is performed on the parameters before return. Else, parameters are normalized prior to return using this object.
        logger - Logger used to report errors that occurred while processing data requests.
        maxCacheSize - The number of input event and wavelength pairs to cache the image parameter cube for before replacing with LRU ordering.
    • Method Detail

      • readInt

        public final int readInt​(byte[] byteBuffer,
                                 int pos)
        Reads a signed int (i.e., 32 bit) from the input. Prior to reading, the input should be realigned at the byte level.
        Returns:
        The next byte-aligned signed int (32 bit) from the input.
      • readFileTypeBox

        public boolean readFileTypeBox​(byte[] byteBuffer,
                                       int pos)
        This method reads the File Type box.
        Returns:
        false if the File Type box was not found or invalid else true
        Throws:
        IOException - If an I/O error occurred.
        EOFException - If the end of file was reached