Class ArchiveHelper
java.lang.Object
org.deltava.beans.acars.ArchiveHelper
A utility class to handle ACARS position archive hash buckets.
- Since:
- 6.2
- Version:
- 11.2
- Author:
- Luke
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
getBucket
(int id) Calculates the bucket for a given flight ID.static File
getOnline
(int id) Returns the File containing archived online data.static File
getPositions
(int id) Returns the File containing archived ACARS position data.static File
getRoute
(int id) Returns the File containing archived route data.static byte[]
load
(ArchiveMetadata md) Loads and validates a Position Archive.static byte[]
load
(ArchiveMetadata md, File f) Loads and validates a Position Archive.
-
Method Details
-
getBucket
Calculates the bucket for a given flight ID.- Parameters:
id
- the flight ID- Returns:
- the bucket name
-
getPositions
Returns the File containing archived ACARS position data.- Parameters:
id
- the ACARS Flight ID- Returns:
- a File, which may or may not exist
-
getRoute
Returns the File containing archived route data.- Parameters:
id
- the Flight ID- Returns:
- a File, which may or may not exist
-
getOnline
Returns the File containing archived online data.- Parameters:
id
- the Flight ID- Returns:
- a File, which may or may not exist
-
load
Loads and validates a Position Archive.- Parameters:
md
- an ArchiveMetadata bean- Returns:
- the loaded and uncompressed data
- Throws:
ArchiveValidationException
- if a validation error occurs
-
load
Loads and validates a Position Archive.- Parameters:
md
- an ArchiveMetadata beanf
- the File to use, overriding the default for testing- Returns:
- the loaded and uncompressed data
- Throws:
ArchiveValidationException
- if a validation error occurs
-