Package PamguardMVC.uid
Class binaryUIDFunctions
java.lang.Object
PamguardMVC.uid.binaryUIDFunctions
Class to handle basic UID functions related to the binary store
- Author:
- mo
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Check if the log file existslong
findMaxUIDforDataBlock
(PamDataBlock aDataBlock) Returns the highest UID number for the PamDataBlock passed.Create a File object using the binary store log filename and the current binary store folderGoes through the binary index files and figures out the last UID for each moduleReads the UID information from the binary store log file.boolean
Delete the binary store UID log fileboolean
saveBinData
(ArrayList<PamDataBlock> allDataBlocks) Saves the UID data for the binary stores to the binary store log file
-
Constructor Details
-
binaryUIDFunctions
Main constructor- Parameters:
pamController
-
-
-
Method Details
-
readLogFile
Reads the UID information from the binary store log file. The file has an xml format- Returns:
-
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
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
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
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
-