Package aris.fileio
Class ARISFileCatalog
- All Implemented Interfaces:
Serializable
File catalog for ARIS sonar files. file format is very simple compared
to Tritech files. Details are at https://github.com/SoundMetrics/aris-file-sdk/tree/master
- Author:
- Doug Gillespie
- See Also:
-
Field Summary
Fields inherited from class tritechgemini.fileio.GeminiFileCatalog
ARISEND, DATEND, ECDEND, GLFEND -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbuildCatalogue(ArrayList<ARISImageRecord> imageRecords) Catalogue the file.protected voidcheckDeserialisedCatalog(String filePath) Called just after a catalogue object has been deserialised, giving the opportunity to check anything.booleanloadFullRecord(ARISImageRecord arisRecord) fully load a record (if it isn't already).voidStop streaming the catalog.streamCatalog(CatalogStreamObserver streamObserver) Start a full forwards only read of the catalog from start to end, sending all records through to the streamObserver.Methods inherited from class tritechgemini.fileio.GeminiFileCatalog
analyseCatalog, cDateToMillis, createCatalogue, findRecordForIDandTime, findRecordForIndexandTime, findRecordIndex, findRelativeRecord, freeAllImageData, freeImageData, getCatalogException, getCatalogName, getFileCatalog, getFilePath, getFirstRecordTime, getFullRecord, getImageRecords, getLastRecordTime, getMaxSonarFrames, getNumRecords, getNumSonars, getRecord, getRecordByIndex, getRecordIndex, getSonarIDs, getSonarInfo, getSonarRecord, getTimeZone, readSerializedCatalog, setImageRecords, setTimeZone, timedLoadFullRecord, writeSerializedCatalog
-
Constructor Details
-
ARISFileCatalog
-
-
Method Details
-
checkDeserialisedCatalog
Description copied from class:GeminiFileCatalogCalled just after a catalogue object has been deserialised, giving the opportunity to check anything. note that the file path is set elsewhere to allow for the possibility that the absolute path to the file may have changed, so it's probably not necessary to do anything here.- Specified by:
checkDeserialisedCatalogin classGeminiFileCatalog<ARISImageRecord>- Parameters:
filePath-
-
buildCatalogue
Description copied from class:GeminiFileCatalogCatalogue the file. i.e. go through the file and get the times and file positions of every record in the file.- Specified by:
buildCataloguein classGeminiFileCatalog<ARISImageRecord>- Parameters:
imageRecords-- Returns:
- true if catalog created successfully
- Throws:
Exception
-
loadFullRecord
Description copied from class:GeminiFileCatalogfully load a record (if it isn't already). This may involve going back to the file and getting and unpacking the raw data.- Specified by:
loadFullRecordin classGeminiFileCatalog<ARISImageRecord>- Parameters:
arisRecord-- Returns:
- true if load sucessful.
- Throws:
IOException
-
streamCatalog
public CatalogStreamSummary streamCatalog(CatalogStreamObserver streamObserver) throws CatalogException Description copied from class:GeminiFileCatalogStart a full forwards only read of the catalog from start to end, sending all records through to the streamObserver.Whatever calls this will almost definitely want to do so in a separate worker thread because the call will block until the read has finished.
- Specified by:
streamCatalogin classGeminiFileCatalog<ARISImageRecord>- Parameters:
streamObserver- observer to get catalog data.- Returns:
- number of records read.
- Throws:
CatalogException
-
stopCatalogStream
public void stopCatalogStream()Description copied from class:GeminiFileCatalogStop streaming the catalog.- Specified by:
stopCatalogStreamin classGeminiFileCatalog<ARISImageRecord>
-