Class AbstractSolarActivityData.SolarActivityGenerator
- java.lang.Object
-
- org.orekit.models.earth.atmosphere.data.AbstractSolarActivityData.SolarActivityGenerator
-
- All Implemented Interfaces:
TimeStampedGenerator<L>
- Enclosing class:
- AbstractSolarActivityData<L extends AbstractSolarActivityDataLoader.LineParameters,D extends AbstractSolarActivityDataLoader<L>>
protected class AbstractSolarActivityData.SolarActivityGenerator extends Object implements TimeStampedGenerator<L>
Generator used in the weather data cache.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SolarActivityGenerator(Collection<L> dataSet)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<L>
generate(AbsoluteDate existingDate, AbsoluteDate date)
Generate a chronologically sorted list of entries to be cached.List<L>
generateDataFromEarliestToLatestDates(AbsoluteDate earliest, AbsoluteDate latest)
Generate a list of parameters between earliest and latest dates.
-
-
-
Constructor Detail
-
SolarActivityGenerator
protected SolarActivityGenerator(Collection<L> dataSet)
Constructor.- Parameters:
dataSet
- weather data
-
-
Method Detail
-
generate
public List<L> generate(AbsoluteDate existingDate, AbsoluteDate date)
Generate a chronologically sorted list of entries to be cached.If
existingDate
is earlier thandate
, the range covered by generated entries must cover at least fromexistingDate
(excluded) todate
(included). IfexistingDate
is later thandate
, the range covered by generated entries must cover at least fromdate
(included) toexistingDate
(excluded).The generated entries may cover a range larger than the minimum specified above if the generator prefers to generate large chunks of data at once. It may generate again entries already generated by an earlier call (typically at
existingDate
), these extra entries will be silently ignored by the cache.Non-coverage of the minimum range may lead to a loss of data, as the gap will not be filled by the
GenericTimeStampedCache
in subsequent calls.The generated entries must be chronologically sorted.
- Specified by:
generate
in interfaceTimeStampedGenerator<L extends AbstractSolarActivityDataLoader.LineParameters>
- Parameters:
existingDate
- date of the closest already existing entry (may be null)date
- date that must be covered by the range of the generated array- Returns:
- chronologically sorted list of generated entries
-
generateDataFromEarliestToLatestDates
public List<L> generateDataFromEarliestToLatestDates(AbsoluteDate earliest, AbsoluteDate latest)
Generate a list of parameters between earliest and latest dates.- Parameters:
earliest
- earliest datelatest
- latest date- Returns:
- list of parameters between earliest and latest dates
-
-