1   /* Copyright 2022-2026 Luc Maisonobe
2    * Licensed to CS GROUP (CS) under one or more
3    * contributor license agreements.  See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * CS licenses this file to You under the Apache License, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License.  You may obtain a copy of the License at
8    *
9    *   http://www.apache.org/licenses/LICENSE-2.0
10   *
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   * See the License for the specific language governing permissions and
15   * limitations under the License.
16   */
17  package org.orekit.files.sinex;
18  
19  import org.orekit.time.AbsoluteDate;
20  import org.orekit.time.TimeScales;
21  
22  /**
23   * Base container for Solution INdependent EXchange (SINEX) files.
24   * @author Bryan Cazabonne
25   * @author Luc Maisonobe
26   * @since 13.0
27   */
28  public class AbstractSinex {
29  
30      /** Version number.
31       * @since 14.0
32       */
33      private final double version;
34  
35      /** Time scales. */
36      private final TimeScales timeScales;
37  
38      /** SINEX file creation date as extracted for the first line. */
39      private final AbsoluteDate creationDate;
40  
41      /** Start time of the data used in the Sinex solution.*/
42      private final AbsoluteDate startDate;
43  
44      /** End time of the data used in the Sinex solution.*/
45      private final AbsoluteDate endDate;
46  
47      /** Simple constructor.
48       * @param version      version number
49       * @param timeScales   time scales
50       * @param creationDate SINEX file creation date
51       * @param startDate    start time of the data used in the Sinex solution
52       * @param endDate      end time of the data used in the Sinex solution
53       * @since 14.0
54       */
55      public AbstractSinex(final double version, final TimeScales timeScales,
56                           final AbsoluteDate creationDate,
57                           final AbsoluteDate startDate, final AbsoluteDate endDate) {
58          this.version      = version;
59          this.timeScales   = timeScales;
60          this.creationDate = creationDate;
61          this.startDate    = startDate;
62          this.endDate      = endDate;
63      }
64  
65      /** Get the version number.
66       * @return version number
67       * @since 14.0
68       */
69      public double getVersion() {
70          return version;
71      }
72  
73      /** Get the time scales.
74       * @return time scales
75       */
76      public TimeScales getTimeScales() {
77          return timeScales;
78      }
79  
80      /** Get the creation date of the parsed SINEX file.
81       * @return SINEX file creation date as an AbsoluteDate
82       */
83      public AbsoluteDate getCreationDate() {
84          return creationDate;
85      }
86  
87      /** Get the file epoch start time.
88       * @return the file epoch start time
89       */
90      public AbsoluteDate getFileEpochStartTime() {
91          return startDate;
92      }
93  
94      /** Get the file epoch end time.
95       * @return the file epoch end time
96       */
97      public AbsoluteDate getFileEpochEndTime() {
98          return endDate;
99      }
100 
101 }