fr.cnes.sirius.patrius.tools.ephemerisComparator
Class Setup

java.lang.Object
  extended by fr.cnes.sirius.patrius.tools.ephemerisComparator.Setup

public class Setup
extends Object

The purpose of this class is to load and represent the setup data for the ephemeris comparator.

Since:
1.0
Version:
$Id: Setup.java 6320 2012-09-20 15:36:28Z CardosoP $
Author:
Philippe Pavero
See Also:
Properties
Concurrency :
not thread-safe
Concurrency comment :
this class is not thread safe due to the fact that some attributes are not private

Constructor Summary
Setup(String filePath)
          Constructor.
 
Method Summary
 ArrayList<String> getColumnTitles()
          get the titles of the columns.
 ArrayList<int[]> getFirstFileColumnIndexes()
          get the column indexes of the first file
 ArrayList<DataType> getFirstFileColumnTypes()
          get the column indexes of the first file
 AllowedFileType getFirstFileType()
          get the type of the first file.
 int getNumberOfColumns()
          get the number of columns that will be used in the ephemeris files.
 ArrayList<int[]> getSecondFileColumnIndexes()
          get the column indexes of the second file
 ArrayList<DataType> getSecondFileColumnTypes()
          get the column indexes of the second file
 AllowedFileType getSecondFileType()
          get the type of the first file.
 ArrayList<Double> getThresholds()
          get the thresholds of the columns.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Setup

public Setup(String filePath)
      throws IOException
Constructor. Uses the properties file which path is given. The resource is first searched in the classpath, then outside. Therefore, a resource in the classpath might hide a resource ouside of it, but it is highly unlikely.

Parameters:
filePath - the path to the properties file
Throws:
EphemerisComparatorRuntimeException - when the file can not be found
IOException - if an error occurs during the reading of the file
Since:
1.0
Method Detail

getNumberOfColumns

public final int getNumberOfColumns()
get the number of columns that will be used in the ephemeris files. This is a redundant information, that is used to check the next properties fields.

Returns:
the number of columns to expect in the next properties fields
Since:
1.0

getColumnTitles

public final ArrayList<String> getColumnTitles()
get the titles of the columns.

Returns:
a list that contain all the titles
Throws:
EphemerisComparatorRuntimeException - if the properties are incoherent, ie if the number of titles does not match the number of columns
Since:
1.0

getThresholds

public final ArrayList<Double> getThresholds()
get the thresholds of the columns.

Returns:
a list that contain all the thresholds
Throws:
EphemerisComparatorRuntimeException - if the properties are incoherent, ie if the number of titles does not match the number of columns
Since:
1.0

getFirstFileType

public final AllowedFileType getFirstFileType()
get the type of the first file.

Returns:
the type of the first file
Throws:
EphemerisComparatorRuntimeException - if the method can not read the file
Since:
1.0

getSecondFileType

public final AllowedFileType getSecondFileType()
get the type of the first file.

Returns:
the type of the first file
Throws:
EphemerisComparatorRuntimeException - if the method can not read the file
Since:
1.0

getFirstFileColumnIndexes

public final ArrayList<int[]> getFirstFileColumnIndexes()
get the column indexes of the first file

Returns:
a list that contain all the column indexes
Throws:
EphemerisComparatorRuntimeException - if the properties are incoherent, ie if the number of sets of column indexes does not match the number of columns
Since:
1.0

getSecondFileColumnIndexes

public final ArrayList<int[]> getSecondFileColumnIndexes()
get the column indexes of the second file

Returns:
a list that contain all the column indexes
Throws:
EphemerisComparatorRuntimeException - if the properties are incoherent, ie if the number of sets of column indexes does not match the number of columns
Since:
1.0

getFirstFileColumnTypes

public final ArrayList<DataType> getFirstFileColumnTypes()
get the column indexes of the first file

Returns:
a list that contain all the column indexes
Throws:
EphemerisComparatorRuntimeException - if the properties are incoherent, ie if the number of sets of column indexes does not match the number of columns
Since:
1.0

getSecondFileColumnTypes

public final ArrayList<DataType> getSecondFileColumnTypes()
get the column indexes of the second file

Returns:
a list that contain all the column indexes
Throws:
EphemerisComparatorRuntimeException - if the properties are incoherent, ie if the number of sets of column indexes does not match the number of columns
Since:
1.0


Copyright © 2016 CNES. All Rights Reserved.