public class PerformanceAssessmentFile extends BaseCollection<PerformanceAssessmentRecord> implements IFreezable
Constructor and Description |
---|
PerformanceAssessmentFile()
Initializes a new instance.
|
Modifier and Type | Method and Description |
---|---|
protected void |
clearItems()
Removes all elements from the
BaseCollection . |
static PerformanceAssessmentFile |
downloadPerformanceAssessmentFile(JulianDate dateOfPaf)
Downloads the Performance Assessment File from an AGI server and returns the contents of the file as a
PerformanceAssessmentFile . |
static PerformanceAssessmentFile |
downloadPerformanceAssessmentFile(JulianDate dateOfPaf,
Proxy proxy)
Downloads the Performance Assessment File from an AGI server and returns the contents of the file as a
PerformanceAssessmentFile . |
static String |
downloadRawPerformanceAssessmentFile(JulianDate dateOfPaf)
Downloads the Performance Assessment File from an AGI server and returns the contents of the file as a string.
|
static String |
downloadRawPerformanceAssessmentFile(JulianDate dateOfPaf,
Proxy proxy)
Downloads the Performance Assessment File from an AGI server and returns the contents of the file as a string.
|
void |
freeze()
Freezes this object.
|
ZonedDateTime |
getCreationDate()
Gets the date the PAF file was created.
|
JulianDate |
getCreationJulianDate()
Gets the date the PAF file was created, represented as a
JulianDate . |
boolean |
getDefaultAllowExtrapolation()
Gets a value indicating whether the evaluator created by this instance is allowed, by default, to extrapolate
assessed performance before the first record or after the last one.
|
Duration |
getDefaultAvailabilityThreshold()
Gets the default availability threshold used when evaluating assessed performance.
|
Evaluator<PerformanceAssessmentField> |
getEvaluator(int prn)
Gets an evaluator that can be used to find assessed performance data over time for a given GPS satellite.
|
Evaluator<PerformanceAssessmentField> |
getEvaluator(int prn,
Duration availabilityThreshold,
boolean allowExtrapolation,
EvaluatorGroup group)
Gets an evaluator that can be used to find assessed performance data over time for a given GPS satellite.
|
Evaluator<PerformanceAssessmentField> |
getEvaluator(int prn,
EvaluatorGroup group)
Gets an evaluator that can be used to find assessed performance data over time for a given GPS satellite.
|
String |
getFileId()
Gets the FILEID of the PAF file.
|
boolean |
getIsFrozen()
Gets a value indicating whether this object is frozen.
|
ZonedDateTime |
getReferenceDate()
Gets the date the PAF file is referenced to.
|
JulianDate |
getReferenceJulianDate()
Gets the date the PAF file is referenced to.
|
Evaluator<SatelliteGlobalUserRangeError> |
getSatelliteGlobalUserRangeErrorEvaluator(IServiceProvider satellite)
Returns an evaluator which can compute the
SatelliteGlobalUserRangeError for this Performance Assessment File at a given time. |
Evaluator<SatelliteGlobalUserRangeError> |
getSatelliteGlobalUserRangeErrorEvaluator(IServiceProvider satellite,
EvaluatorGroup group)
Returns an evaluator which can compute the
SatelliteGlobalUserRangeError for this Performance Assessment File at a given time. |
String |
getSource()
Gets the source of the PAF file.
|
String |
getSystemId()
Gets the SYSID of the PAF file.
|
int |
getVersion()
Gets the version of the PAF file
|
protected void |
insertItem(int index,
PerformanceAssessmentRecord item)
Inserts an element into the
BaseCollection
at the specified index. |
static PerformanceAssessmentFile |
readFrom(BufferedReader reader)
Reads a
PerformanceAssessmentFile from a reader. |
static PerformanceAssessmentFile |
readFrom(InputStream stream)
Reads a
PerformanceAssessmentFile from a stream. |
static PerformanceAssessmentFile |
readFrom(String fileName)
Reads a
PerformanceAssessmentFile from a file. |
protected void |
removeItem(int index)
Removes the element at the specified index of the
BaseCollection . |
void |
setCreationDate(ZonedDateTime value)
Sets the date the PAF file was created.
|
void |
setDefaultAllowExtrapolation(boolean value)
Sets a value indicating whether the evaluator created by this instance is allowed, by default, to extrapolate
assessed performance before the first record or after the last one.
|
void |
setDefaultAvailabilityThreshold(Duration value)
Sets the default availability threshold used when evaluating assessed performance.
|
void |
setFileId(String value)
Sets the FILEID of the PAF file.
|
protected void |
setItem(int index,
PerformanceAssessmentRecord item)
Replaces the element at the specified index.
|
void |
setReferenceDate(ZonedDateTime value)
Sets the date the PAF file is referenced to.
|
void |
setSource(String value)
Sets the source of the PAF file.
|
void |
setSystemId(String value)
Sets the SYSID of the PAF file.
|
void |
setVersion(int value)
Sets the version of the PAF file
|
add, add, addAll, addAll, clear, contains, containsAll, get, getItems, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
equals, hashCode, replaceAll, sort, spliterator
parallelStream, removeIf, stream
public PerformanceAssessmentFile()
public final void freeze()
ObjectFrozenException
.freeze
in interface IFreezable
public final boolean getIsFrozen()
ObjectFrozenException
will be thrown if an attempt is made to do so.getIsFrozen
in interface IFreezable
@Nonnull public static PerformanceAssessmentFile readFrom(@Nonnull String fileName)
PerformanceAssessmentFile
from a file.fileName
- The name of the PerformanceAssessmentFile
from which to read.PerformanceAssessmentFile
instance containing the data read from the file.ArgumentNullException
- Thrown when fileName
is null
.@Nonnull public static PerformanceAssessmentFile readFrom(@Nonnull InputStream stream)
PerformanceAssessmentFile
from a stream.stream
- A stream from which to read the PerformanceAssessmentFile
.PerformanceAssessmentFile
instance containing the data read from the stream.ArgumentNullException
- Thrown when stream
is null
.@Nonnull public static PerformanceAssessmentFile readFrom(@Nonnull BufferedReader reader)
PerformanceAssessmentFile
from a reader.reader
- The reader from which to read the PerformanceAssessmentFile
.PerformanceAssessmentFile
instance containing the data read from the reader.ArgumentNullException
- Thrown when reader
is null
.@Nonnull public static PerformanceAssessmentFile downloadPerformanceAssessmentFile(@Nonnull JulianDate dateOfPaf)
PerformanceAssessmentFile
.
This method connects via HTTPS to ftp.agi.com.
Note that an internet connection is required to use this method successfully.
dateOfPaf
- Date for which the PerformanceAssessmentFile
is needed.PerformanceAssessmentFile
populated with the data returned from the server.DataUnavailableException
- Thrown when the data cannot be retrieved from the server.@Nonnull public static PerformanceAssessmentFile downloadPerformanceAssessmentFile(@Nonnull JulianDate dateOfPaf, @Nullable Proxy proxy)
PerformanceAssessmentFile
.
This method connects via HTTPS to ftp.agi.com.
Note that an internet connection is required to use this method successfully.
dateOfPaf
- Date for which the PerformanceAssessmentFile
is needed.proxy
- Proxy to use when connecting.PerformanceAssessmentFile
populated with the data returned from the server.DataUnavailableException
- Thrown when the data cannot be retrieved from the server.@Nonnull public static String downloadRawPerformanceAssessmentFile(@Nonnull JulianDate dateOfPaf)
Note that an internet connection is required to use this method successfully.
dateOfPaf
- Date for which the PerformanceAssessmentFile
is needed.DataUnavailableException
- Thrown when the data cannot be retrieved from the server.@Nonnull public static String downloadRawPerformanceAssessmentFile(@Nonnull JulianDate dateOfPaf, @Nullable Proxy proxy)
Note that an internet connection is required to use this method successfully.
dateOfPaf
- Date for which the PerformanceAssessmentFile
is needed.proxy
- Proxy to use when connecting.DataUnavailableException
- Thrown when the data cannot be retrieved from the server.@Nonnull public final ZonedDateTime getCreationDate()
public final void setCreationDate(@Nonnull ZonedDateTime value)
@Nonnull public final JulianDate getCreationJulianDate()
JulianDate
.@Nonnull public final ZonedDateTime getReferenceDate()
public final void setReferenceDate(@Nonnull ZonedDateTime value)
@Nonnull public final JulianDate getReferenceJulianDate()
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)
public final int getVersion()
public final void setVersion(int value)
@Nonnull public final Duration getDefaultAvailabilityThreshold()
public final void setDefaultAvailabilityThreshold(@Nonnull Duration value)
public final boolean getDefaultAllowExtrapolation()
public final void setDefaultAllowExtrapolation(boolean value)
@Nonnull public final Evaluator<PerformanceAssessmentField> getEvaluator(int prn)
Availability is computed using the DefaultAvailabilityThreshold
(get
/ set
). Data extrapolation is
controlled by the DefaultAllowExtrapolation
(get
/ set
) property.
prn
- The Pseudo Random Number (PRN) identifying the satellite.@Nonnull public final Evaluator<PerformanceAssessmentField> getEvaluator(int prn, EvaluatorGroup group)
Availability is computed using the DefaultAvailabilityThreshold
(get
/ set
). Data extrapolation is
controlled by the DefaultAllowExtrapolation
(get
/ set
) property.
prn
- The Pseudo Random Number (PRN) identifying the satellite.group
- The group with which to associate the new evaluator. By grouping evaluators
that are often evaluated at the same Julian dates, common computations can be performed only once
for the entire group instead of multiple times for each evaluator.@Nonnull public final Evaluator<PerformanceAssessmentField> getEvaluator(int prn, @Nonnull Duration availabilityThreshold, boolean allowExtrapolation, @Nonnull EvaluatorGroup group)
prn
- The Pseudo Random Number (PRN) identifying the satellite.availabilityThreshold
- The availability threshold used when evaluating assessed performance. If two records in the file
are separated by a duration longer than this availability threshold, the evaluator will report that it is not available
between the two records.allowExtrapolation
- Indicates whether the returned evaluator is allowed to extrapolate assessed performance before the
first record or after the last one.group
- The group with which to associate the new evaluator. By grouping evaluators
that are often evaluated at the same Julian dates, common computations can be performed only once
for the entire group instead of multiple times for each evaluator.ArgumentNullException
- Thrown when group
is null
.@Nonnull public final Evaluator<SatelliteGlobalUserRangeError> getSatelliteGlobalUserRangeErrorEvaluator(@Nonnull IServiceProvider satellite)
SatelliteGlobalUserRangeError
for this Performance Assessment File at a given time.satellite
- The GPS satellite for which to obtain the global user range error. The satellite instance must
provide IGpsPrnService
and IOrientationAxesService
.ArgumentNullException
- Thrown when satellite
is null
.@Nonnull public final Evaluator<SatelliteGlobalUserRangeError> getSatelliteGlobalUserRangeErrorEvaluator(@Nonnull IServiceProvider satellite, @Nonnull EvaluatorGroup group)
SatelliteGlobalUserRangeError
for this Performance Assessment File at a given time.satellite
- The GPS satellite for which to obtain the global user range error. The satellite instance must
provide IGpsPrnService
and IOrientationAxesService
.group
- The group with which to associate the new evaluator. By grouping evaluators
that are often evaluated at the same Julian dates, common computations can be performed only once
for the entire group instead of multiple times for each evaluator.ArgumentNullException
- Thrown when satellite
or group
is null
.protected void clearItems()
BaseCollection
.clearItems
in class BaseCollection<PerformanceAssessmentRecord>
protected void insertItem(int index, PerformanceAssessmentRecord item)
BaseCollection
at the specified index.insertItem
in class BaseCollection<PerformanceAssessmentRecord>
index
- Index where the item is inserted.item
- The object that will be inserted.protected void removeItem(int index)
BaseCollection
.removeItem
in class BaseCollection<PerformanceAssessmentRecord>
index
- Index where the item is removed.protected void setItem(int index, PerformanceAssessmentRecord item)
setItem
in class BaseCollection<PerformanceAssessmentRecord>
index
- Index where the item will be replaced.item
- The new value for the element at the specified index.