Package ucar.unidata.data.adt
Class History
java.lang.Object
ucar.unidata.data.adt.History
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic ucar.unidata.data.adt.IRHistoryRecord[]
static int
static ucar.unidata.data.adt.IRHistoryRecord
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
CommentHistoryRecords
(String CommentString) Insert comment in history file at specifified date/time.static int[]
DeleteHistoryRecords
(boolean RunFullAnalysis, String HistoryFileName) Delete record(s) in a history file.static int
static void
InitCurrent
(boolean InitialFlagTF) static int[]
InsertHistoryRecord
(boolean RunFullAnalysis, String HistoryFileName) Insert or overwrite a record in a history file.static String
ListHistory
(int OutputStyle, int OutputFormatTypeID, String ATCFFileSourceIDString, String ATCFStormIDString) List the ASCII history file between given date/times.void
ReadHistoryFile
(String filename) static int
WriteHistoryFile
(String HistoryFileName) Write HistoryRecordPtr structure to ASCII history file.
-
Field Details
-
HistoryFileRecords
public static int HistoryFileRecords -
HistoryFile
public static ucar.unidata.data.adt.IRHistoryRecord[] HistoryFile -
IRCurrentRecord
public static ucar.unidata.data.adt.IRHistoryRecord IRCurrentRecord
-
-
Constructor Details
-
History
public History()
-
-
Method Details
-
HistoryNumberOfRecords
public static int HistoryNumberOfRecords() -
ListHistory
public static String ListHistory(int OutputStyle, int OutputFormatTypeID, String ATCFFileSourceIDString, String ATCFStormIDString) List the ASCII history file between given date/times.- Parameters:
OutputStyle
- Output one record (-1) or entire file (0).OutputFormatTypeID
- 0=ATCF, -1=History List.ATCFFileSourceIDString
- ATCF file source identifier.ATCFStormIDString
- ATCF storm identifier.- Returns:
- Matching part of the ASCII history file.
-
InsertHistoryRecord
Insert or overwrite a record in a history file. Global structure HistoryRecordPtr will be modified and the ASCII history file will be rewritten in another routine.- Parameters:
RunFullAnalysis
- Full analysis toggle.HistoryFileName
- File to modify.- Returns:
- Array of two integers. The first value represents the number of
inserted records. The second value is flag that describes the
"type" of modification (possible values are 1, 2, 3,
4).
- Overwritten
- Inserted
- Record placed at start of new history structure.
- Record placed at end of existing history structure.
-
DeleteHistoryRecords
Delete record(s) in a history file.Routine will modify structure HistoryRecordPtr, which will then be rewritten to ASCII history file in another subroutine.
- Parameters:
RunFullAnalysis
- Full analysis toggle.HistoryFileName
- File to modify.- Returns:
- Array containing two integer values. The first value is the number of modified records, and the seconds value is the number of deleted records.
-
CommentHistoryRecords
Insert comment in history file at specifified date/time.- Parameters:
CommentString
- Character string field to be inserted.- Returns:
- If
-1
, there was an error finding record, if>= 0
, number of modified records.
-
WriteHistoryFile
Write HistoryRecordPtr structure to ASCII history file.- Parameters:
HistoryFileName
- File to write.- Returns:
- If
>= 0
, the value represents the number of records written. If -2, there was an error readingHistoryFileName
. If-3
, there was an error writingHistoryFileName
. Finally, if-5
, there was an error closingHistoryFileName
. - Throws:
IOException
- if there was a problem writing toHistoryFileName
.
-
InitCurrent
public static void InitCurrent(boolean InitialFlagTF) -
ReadHistoryFile
- Throws:
IOException
-