public final class FindArraysDAF extends Object
Conceptually, the arrays in a DAF form a doubly linked list, which can be searched in either of two directions: forward or backward. It is possible to search multiple DAFs simultaneously.
Based on various routines of the daffa.for file in the SPICE library.
Modifier and Type | Method and Description |
---|---|
static void |
beginBackwardSearch(int handle)
Begin a backward search for arrays in a DAF.
This method is based on the DAFBBS routine from the SPICE library. |
static void |
beginForwardSearch(int handle)
Begin forward search for arrays in a DAF.
Based on DAFBFS from the SPICE library. |
static boolean |
findNextArray()
Find the next (forward) array in the current DAF.
Based on DAFFNA from the SPICE library. |
static boolean |
findPreviousArray()
Find the previous (backward) array in the current DAF.
This method is based on the DAFFPA routine from the SPICE library. |
static String |
getNameOfArray()
Return (get) the name for the current array in the current DAF.
Based on DAFGN of the SPICE library. |
static double[] |
getSummaryOfArray()
Return (get) the summary for the current array in the current DAF.
Based on DAFGS from the SPICE library |
static String |
readCharacterRecordDaf(int handle,
int record)
Read the contents of a character record from a DAF.
Based on DAFRCR from the SPICE library. |
static void |
selectDaf(int handle)
Select a DAF that already has a search in progress as the one to continue searching.
Based on the DAFCS routine of the SPICE library |
public static void beginForwardSearch(int handle) throws PatriusException
handle
- Handle of file to be searchedPatriusException
- if there is a problem with the SPICE algorithmIOException
- if there is a problem reading the first record of the filepublic static void beginBackwardSearch(int handle) throws PatriusException
handle
- Handle of DAF to be searchedPatriusException
- if there is a problem finding the file or reading itIOException
- if there is a problem opening the random access filepublic static void selectDaf(int handle) throws PatriusException
handle
- Handle of DAF to continue searchingPatriusException
- if the access mode is not correct or the DAF associated to the handle is not being searchedpublic static boolean findNextArray() throws PatriusException
PatriusException
- if there is a problem in the SPICE algorithmpublic static boolean findPreviousArray() throws PatriusException
PatriusException
- if there is a problem accessing/reading the current filepublic static double[] getSummaryOfArray() throws PatriusException
PatriusException
- if there is a problem while reading the filepublic static String getNameOfArray() throws PatriusException
IOException
- if there is problem while reading a character recordPatriusException
- if there is a problem in regarding the SPICE algorithmpublic static String readCharacterRecordDaf(int handle, int record) throws PatriusException
handle
- Handle of DAFrecord
- Record number of character recordIOException
- if there is a problem reading the filePatriusException
- if the access method is not correctCopyright © 2023 CNES. All rights reserved.