Class binaryUIDFunctions

java.lang.Object
PamguardMVC.uid.binaryUIDFunctions

public class binaryUIDFunctions extends Object
Class to handle basic UID functions related to the binary store
Author:
mo
  • Constructor Details

    • binaryUIDFunctions

      public binaryUIDFunctions(PamController pamController)
      Main constructor
      Parameters:
      pamController -
  • Method Details

    • readLogFile

      public ArrayList<UIDTrackerData> readLogFile()
      Reads the UID information from the binary store log file. The file has an xml format
      Returns:
    • getLogFile

      public File getLogFile()
      Create a File object using the binary store log filename and the current binary store folder
      Returns:
    • checkFileExists

      public boolean checkFileExists()
      Check if the log file exists
      Returns:
    • saveBinData

      public boolean saveBinData(ArrayList<PamDataBlock> allDataBlocks)
      Saves the UID data for the binary stores to the binary store log file
      Parameters:
      allDataBlocks - a list of all datablocks in the system
      Returns:
    • getUIDsFromBinaryStores

      public List<UIDTrackerData> getUIDsFromBinaryStores()
      Goes through the binary index files and figures out the last UID for each module
      Returns:
      a List of uidTrackerData objects containing module and UID information
    • findMaxUIDforDataBlock

      public long findMaxUIDforDataBlock(PamDataBlock aDataBlock)
      Returns the highest UID number for the PamDataBlock passed. This method first looks through the Tracker Table, and if it can't find a suitable UID it then looks through the database table directly associated with the PamDataBlock. Returns -1 if there was a problem retrieving the information
      Parameters:
      aDataBlock -
      Returns:
    • removeLogFile

      public boolean removeLogFile()
      Delete the binary store UID log file