1   /* Copyright 2022-2025 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      /** Time scales. */
31      private final TimeScales timeScales;
32  
33      /** SINEX file creation date as extracted for the first line. */
34      private final AbsoluteDate creationDate;
35  
36      /** Start time of the data used in the Sinex solution.*/
37      private final AbsoluteDate startDate;
38  
39      /** End time of the data used in the Sinex solution.*/
40      private final AbsoluteDate endDate;
41  
42      /** Simple constructor.
43       * @param timeScales time scales
44       * @param creationDate SINEX file creation date
45       * @param startDate start time of the data used in the Sinex solution
46       * @param endDate end time of the data used in the Sinex solution
47       */
48      public AbstractSinex(final TimeScales timeScales, final AbsoluteDate creationDate,
49                           final AbsoluteDate startDate, final AbsoluteDate endDate) {
50          this.timeScales   = timeScales;
51          this.creationDate = creationDate;
52          this.startDate    = startDate;
53          this.endDate      = endDate;
54      }
55  
56      /** Get the time scales.
57       * @return time scales
58       */
59      public TimeScales getTimeScales() {
60          return timeScales;
61      }
62  
63      /** Get the creation date of the parsed SINEX file.
64       * @return SINEX file creation date as an AbsoluteDate
65       */
66      public AbsoluteDate getCreationDate() {
67          return creationDate;
68      }
69  
70      /** Get the file epoch start time.
71       * @return the file epoch start time
72       */
73      public AbsoluteDate getFileEpochStartTime() {
74          return startDate;
75      }
76  
77      /** Get the file epoch end time.
78       * @return the file epoch end time
79       */
80      public AbsoluteDate getFileEpochEndTime() {
81          return endDate;
82      }
83  
84  }