public class PredictionSupportFile extends BaseCollection<PredictionSupportRecord>
Constructor and Description |
---|
PredictionSupportFile()
Initializes a new instance.
|
Modifier and Type | Method and Description |
---|---|
static PredictionSupportFile |
downloadPredictionSupportFile(JulianDate dateOfPsf)
Downloads the Prediction Support File from an AGI server and returns the contents of the file as a
PredictionSupportFile . |
static PredictionSupportFile |
downloadPredictionSupportFile(JulianDate dateOfPsf,
Proxy proxy)
Downloads the Prediction Support File from an AGI server and returns the contents of the file as a
PredictionSupportFile . |
static String |
downloadRawPredictionSupportFile(JulianDate dateOfPsf)
Downloads the Prediction Support File from an AGI server and returns the contents of the file as a string.
|
static String |
downloadRawPredictionSupportFile(JulianDate dateOfPsf,
Proxy proxy)
Downloads the Prediction Support File from an AGI server and returns the contents of the file as a string.
|
PredictionSupportRecord |
findRecordByPrn(int prn)
Finds the prediction support record corresponding to a specified pseudo-random number (PRN).
|
ZonedDateTime |
getCreationDate()
Gets the creation date of the PSF file.
|
JulianDate |
getCreationJulianDate()
Gets the creation date of the PSF file express as a
JulianDate . |
String |
getFileId()
Gets the FILEID of the PSF file.
|
ZonedDateTime |
getReferenceDate()
Gets the reference date of the PSF file.
|
JulianDate |
getReferenceJulianDate()
Gets the reference date of the PSF file expressed as a
JulianDate . |
String |
getSource()
Gets the SOURCE of the PSF file.
|
String |
getSystemId()
Gets the SYSID of the PSF file.
|
static PredictionSupportFile |
readFrom(BufferedReader reader)
Reads a
PredictionSupportFile in version 1 format from a reader. |
static PredictionSupportFile |
readFrom(InputStream stream)
Reads a
PredictionSupportFile in version 1 format from a stream. |
static PredictionSupportFile |
readFrom(String fileName)
Reads a
PredictionSupportFile in version 1 format. |
void |
setCreationDate(ZonedDateTime value)
Sets the creation date of the PSF file.
|
void |
setFileId(String value)
Sets the FILEID of the PSF file.
|
void |
setReferenceDate(ZonedDateTime value)
Sets the reference date of the PSF file.
|
void |
setSource(String value)
Sets the SOURCE of the PSF file.
|
void |
setSystemId(String value)
Sets the SYSID of the PSF file.
|
void |
writeToPsfVersion1(Writer writer)
Write a PSF file in version 1 format.
|
add, add, addAll, addAll, clear, clearItems, contains, containsAll, get, getItems, indexOf, insertItem, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeItem, retainAll, set, setItem, size, subList, toArray, toArray
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
equals, hashCode, replaceAll, sort, spliterator
parallelStream, removeIf, stream
@Nonnull public static PredictionSupportFile readFrom(@Nonnull String fileName)
PredictionSupportFile
in version 1 format.fileName
- The name of the PredictionSupportFile
from which to read.PredictionSupportFile
instance containing the data read from the file.ArgumentNullException
- Thrown when fileName
is null
.@Nonnull public static PredictionSupportFile readFrom(@Nonnull InputStream stream)
PredictionSupportFile
in version 1 format from a stream.stream
- A stream from which to read the PredictionSupportFile
.PredictionSupportFile
instance containing the data read from the stream.ArgumentNullException
- Thrown when stream
is null
.@Nonnull public static PredictionSupportFile readFrom(@Nonnull BufferedReader reader)
PredictionSupportFile
in version 1 format from a reader.reader
- The reader from which to read the PredictionSupportFile
.PredictionSupportFile
instance containing the data read from the reader.ArgumentNullException
- Thrown when reader
is null
.@Nonnull public static PredictionSupportFile downloadPredictionSupportFile(@Nonnull JulianDate dateOfPsf)
PredictionSupportFile
.
This method connects via HTTPS to ftp.agi.com.dateOfPsf
- Date for which the PredictionSupportFile
is needed.PredictionSupportFile
populated with the data returned from the server.DataUnavailableException
- Thrown when the data cannot be retrieved from the server.@Nonnull public static PredictionSupportFile downloadPredictionSupportFile(@Nonnull JulianDate dateOfPsf, Proxy proxy)
PredictionSupportFile
.
This method connects via HTTPS to ftp.agi.com.dateOfPsf
- Date for which the PredictionSupportFile
is needed.proxy
- Proxy to use when connecting.PredictionSupportFile
populated with the data returned from the server.DataUnavailableException
- Thrown when the data cannot be retrieved from the server.@Nonnull public static String downloadRawPredictionSupportFile(@Nonnull JulianDate dateOfPsf)
dateOfPsf
- Date for which the PredictionSupportFile
is needed.DataUnavailableException
- Thrown when the data cannot be retrieved from the server.@Nonnull public static String downloadRawPredictionSupportFile(@Nonnull JulianDate dateOfPsf, @Nullable Proxy proxy)
dateOfPsf
- Date for which the PredictionSupportFile
is needed.proxy
- Proxy to use when connecting.DataUnavailableException
- Thrown when the data cannot be retrieved from the server.public final String getFileId()
public final void setFileId(String value)
public final String getSystemId()
public final void setSystemId(String value)
public final String getSource()
public final void setSource(String value)
@Nonnull public final ZonedDateTime getReferenceDate()
public final void setReferenceDate(@Nonnull ZonedDateTime value)
@Nonnull public final JulianDate getReferenceJulianDate()
JulianDate
.@Nonnull public final ZonedDateTime getCreationDate()
public final void setCreationDate(@Nonnull ZonedDateTime value)
@Nonnull public final JulianDate getCreationJulianDate()
JulianDate
.public final PredictionSupportRecord findRecordByPrn(int prn)
prn
- The PRN for which to obtain a record.null
if a record does not exist for the PRN.