1   /* Copyright 2002-2025 CS GROUP
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.rinex.section;
18  
19  import org.orekit.files.rinex.utils.RinexFileType;
20  import org.orekit.gnss.SatelliteSystem;
21  import org.orekit.time.AbsoluteDate;
22  import org.orekit.time.DateTimeComponents;
23  
24  /** Base container for Rinex headers.
25   * @since 12.0
26   */
27  public class RinexBaseHeader {
28  
29      /** File type . */
30      private final RinexFileType fileType;
31  
32      /** Rinex format Version. */
33      private double formatVersion;
34  
35      /** Satellite System of the Rinex file (G/R/S/E/M). */
36      private SatelliteSystem satelliteSystem;
37  
38      /** Name of the program creating current file. */
39      private String programName;
40  
41      /** Name of the creator of the current file. */
42      private String runByName;
43  
44      /** Date of the file creation. */
45      private DateTimeComponents creationDateComponents;
46  
47      /** Time zone of the file creation. */
48      private String creationTimeZone;
49  
50      /** Creation date as absolute date. */
51      private AbsoluteDate creationDate;
52  
53      /** Digital Object Identifier.
54       * @since 12.0
55       */
56      private String doi;
57  
58      /** License of use.
59       * @since 12.0
60       */
61      private String license;
62  
63      /** Station information.
64       * @since 12.0
65       */
66      private String stationInformation;
67  
68      /** Simple constructor.
69       * @param fileType file type
70       */
71      protected RinexBaseHeader(final RinexFileType fileType) {
72          this.fileType      = fileType;
73          this.formatVersion = Double.NaN;
74      }
75  
76      /**
77       * Get the file type.
78       * @return file type
79       */
80      public RinexFileType getFileType() {
81          return fileType;
82      }
83  
84      /**
85       * Getter for the format version.
86       * @return the format version
87       */
88      public double getFormatVersion() {
89          return formatVersion;
90      }
91  
92      /**
93       * Setter for the format version.
94       * @param formatVersion the format version to set
95       */
96      public void setFormatVersion(final double formatVersion) {
97          this.formatVersion = formatVersion;
98      }
99  
100     /**
101      * Getter for the satellite system.
102      * <p>
103      * Not specified for RINEX 2.X versions (value is null).
104      * </p>
105      * @return the satellite system
106      */
107     public SatelliteSystem getSatelliteSystem() {
108         return satelliteSystem;
109     }
110 
111     /**
112      * Setter for the satellite system.
113      * @param satelliteSystem the satellite system to set
114      */
115     public void setSatelliteSystem(final SatelliteSystem satelliteSystem) {
116         this.satelliteSystem = satelliteSystem;
117     }
118 
119     /**
120      * Getter for the program name.
121      * @return the program name
122      */
123     public String getProgramName() {
124         return programName;
125     }
126 
127     /**
128      * Setter for the program name.
129      * @param programName the program name to set
130      */
131     public void setProgramName(final String programName) {
132         this.programName = programName;
133     }
134 
135     /**
136      * Getter for the run/by name.
137      * @return the run/by name
138      */
139     public String getRunByName() {
140         return runByName;
141     }
142 
143     /**
144      * Setter for the run/by name.
145      * @param runByName the run/by name to set
146      */
147     public void setRunByName(final String runByName) {
148         this.runByName = runByName;
149     }
150 
151     /**
152      * Getter for the creation date of the file as a string.
153      * @return the creation date
154      */
155     public DateTimeComponents getCreationDateComponents() {
156         return creationDateComponents;
157     }
158 
159     /**
160      * Setter for the creation date as a string.
161      * @param creationDateComponents the creation date to set
162      */
163     public void setCreationDateComponents(final DateTimeComponents creationDateComponents) {
164         this.creationDateComponents = creationDateComponents;
165     }
166 
167     /**
168      * Getter for the creation time zone of the file as a string.
169      * @return the creation time zone as a string
170      */
171     public String getCreationTimeZone() {
172         return creationTimeZone;
173     }
174 
175     /**
176      * Setter for the creation time zone.
177      * @param creationTimeZone the creation time zone to set
178      */
179     public void setCreationTimeZone(final String creationTimeZone) {
180         this.creationTimeZone = creationTimeZone;
181     }
182 
183     /**
184      * Getter for the creation date.
185      * @return the creation date
186      */
187     public AbsoluteDate getCreationDate() {
188         return creationDate;
189     }
190 
191     /**
192      * Setter for the creation date.
193      * @param creationDate the creation date to set
194      */
195     public void setCreationDate(final AbsoluteDate creationDate) {
196         this.creationDate = creationDate;
197     }
198 
199     /**
200      *  Getter for the Digital Object Information.
201      * @return the Digital Object Information
202      * @since 12.0
203      */
204     public String getDoi() {
205         return doi;
206     }
207 
208     /**
209      * Setter for the Digital Object Information.
210      * @param doi the Digital Object Information to set
211      * @since 12.0
212      */
213     public void setDoi(final String doi) {
214         this.doi = doi;
215     }
216 
217     /**
218      *  Getter for the license of use.
219      * @return the license of use
220      * @since 12.0
221      */
222     public String getLicense() {
223         return license;
224     }
225 
226     /**
227      * Setter for the license of use.
228      * @param license the license of use
229      * @since 12.0
230      */
231     public void setLicense(final String license) {
232         this.license = license;
233     }
234 
235     /**
236      *  Getter for the station information.
237      * @return the station information
238      * @since 12.0
239      */
240     public String getStationInformation() {
241         return stationInformation;
242     }
243 
244     /**
245      * Setter for the station information.
246      * @param stationInformation the station information to set
247      * @since 12.0
248      */
249     public void setStationInformation(final String stationInformation) {
250         this.stationInformation = stationInformation;
251     }
252 
253 }