fr.cnes.sirius.patrius.signalpropagation.iono
Class R12Loader

java.lang.Object
  extended by fr.cnes.sirius.patrius.signalpropagation.iono.R12Loader
All Implemented Interfaces:
R12Provider, DataLoader

public final class R12Loader
extends Object
implements R12Provider, DataLoader

Data loader for the R12 values.

Since:
1.3
Version:
$Id: R12Loader.java 7115 2012-12-12 08:08:48Z CardosoP $
Author:
cardosop
Concurrency :
conditionally thread-safe
Concurrency comment :
the instance is mutable, but no longer changes after the first call to getR12() (the first call triggers the DataProvidersManager on the instance). This means : an instance can be shared and used in several threads, if getR12() is called once in a single thread context first.

Constructor Summary
R12Loader(String supportedFileName)
          Constructor.
 
Method Summary
 double getR12(AbsoluteDate date)
          Provides the R12 value for the Bent model.
 void loadData(InputStream input, String name)
          Load data from a stream.
 boolean stillAcceptsData()
          Check if the loader still accepts new data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

R12Loader

public R12Loader(String supportedFileName)
          throws OrekitException
Constructor.

Parameters:
supportedFileName - file name the DataProvidersManager will send to the instance.
Throws:
OrekitException - should not happen
Method Detail

stillAcceptsData

public boolean stillAcceptsData()
Description copied from interface: DataLoader
Check if the loader still accepts new data.

This method is used to speed up data loading by interrupting crawling the data sets as soon as a loader has found the data it was waiting for. For loaders that can merge data from any number of sources (for example JPL ephemerides or Earth Orientation Parameters that are split among several files), this method should always return true to make sure no data is left over.

Specified by:
stillAcceptsData in interface DataLoader
Returns:
true while the loader still accepts new data

loadData

public void loadData(InputStream input,
                     String name)
              throws IOException,
                     ParseException,
                     OrekitException
Description copied from interface: DataLoader
Load data from a stream.

Specified by:
loadData in interface DataLoader
Parameters:
input - data input stream
name - name of the file (or zip entry)
Throws:
IOException - if data can't be read
ParseException - if data can't be parsed
OrekitException - if some data is missing or if some loader specific error occurs

getR12

public double getR12(AbsoluteDate date)
              throws OrekitException
Description copied from interface: R12Provider
Provides the R12 value for the Bent model.

Specified by:
getR12 in interface R12Provider
Parameters:
date - the date
Returns:
r12 R12 value for the date
Throws:
OrekitException - in case of data loading issues


Copyright © 2016 CNES. All Rights Reserved.