public abstract class OceanTidesCoefficientsReader extends Object implements DataLoader, OceanTidesCoefficientsProvider
For any format specific reader of ocean tides coefficients file, this interface represents all the methods that
should be implemented by a reader.
The proper way to use this it to call the getCoefficientProvider
method. Indeed, the OceanTidesCoefficientsFactory
will determine the best reader to
use, depending on file available in the file system.
OceanTidesCoefficientsFactory
Modifier and Type | Field and Description |
---|---|
protected boolean |
readCompleted
Indicator for completed read.
|
Modifier | Constructor and Description |
---|---|
protected |
OceanTidesCoefficientsReader(String supportedNames)
Simple constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
add(OceanTidesCoefficientsSet set)
Add a
OceanTidesCoefficientsSet to the data map |
double[] |
getCpmEpm(double nDoodson,
int l,
int m)
Get the Clm± and εlm± for given wave
|
double[] |
getCpmSpm(double nDoodson,
int l,
int m)
Get the Clm± and Slm± for given wave
|
double[] |
getDoodsonNumbers()
Get available Doodson numbers
|
int |
getMaxDegree(double doodson,
int order)
Get maximum degree for given wave and order
|
int |
getMaxOrder(double doodson)
Get maximum order for given wave
|
int |
getMinDegree(double doodson,
int order)
Get min degree for given wave and order
|
String |
getSupportedNames()
Get the regular expression for supported files names.
|
protected boolean |
isEmpty()
Chech if data map is empty
|
abstract void |
loadData(InputStream input,
String name)
Load data from a stream.
|
boolean |
stillAcceptsData()
Check if the loader still accepts new data.
|
protected OceanTidesCoefficientsReader(String supportedNames)
Build an uninitialized reader.
supportedNames
- regular expression for supported files namespublic double[] getDoodsonNumbers()
getDoodsonNumbers
in interface OceanTidesCoefficientsProvider
public int getMaxDegree(double doodson, int order)
getMaxDegree
in interface OceanTidesCoefficientsProvider
doodson
- numberorder
- of wavepublic int getMinDegree(double doodson, int order)
getMinDegree
in interface OceanTidesCoefficientsProvider
doodson
- numberorder
- of wavepublic int getMaxOrder(double doodson)
getMaxOrder
in interface OceanTidesCoefficientsProvider
doodson
- numberpublic double[] getCpmSpm(double nDoodson, int l, int m)
getCpmSpm
in interface OceanTidesCoefficientsProvider
nDoodson
- doodson numberl
- orderm
- degreepublic double[] getCpmEpm(double nDoodson, int l, int m)
getCpmEpm
in interface OceanTidesCoefficientsProvider
nDoodson
- doodson number doodson numberl
- orderm
- degreepublic boolean stillAcceptsData()
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.
stillAcceptsData
in interface DataLoader
public abstract void loadData(InputStream input, String name) throws IOException, ParseException, PatriusException
loadData
in interface DataLoader
input
- data input streamname
- name of the file (or zip entry)IOException
- if data can't be readParseException
- if data can't be parsedPatriusException
- if some data is missing
or if some loader specific error occurspublic String getSupportedNames()
protected boolean isEmpty()
protected void add(OceanTidesCoefficientsSet set)
OceanTidesCoefficientsSet
to the data mapset
- set to add to mapCopyright © 2019 CNES. All rights reserved.