RinexBaseHeader.java

  1. /* Copyright 2002-2024 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. import org.orekit.files.rinex.utils.RinexFileType;
  19. import org.orekit.gnss.SatelliteSystem;
  20. import org.orekit.time.AbsoluteDate;
  21. import org.orekit.time.DateTimeComponents;

  22. /** Base container for Rinex headers.
  23.  * @since 12.0
  24.  */
  25. public class RinexBaseHeader {

  26.     /** File type . */
  27.     private final RinexFileType fileType;

  28.     /** Rinex format Version. */
  29.     private double formatVersion;

  30.     /** Satellite System of the Rinex file (G/R/S/E/M). */
  31.     private SatelliteSystem satelliteSystem;

  32.     /** Name of the program creating current file. */
  33.     private String programName;

  34.     /** Name of the creator of the current file. */
  35.     private String runByName;

  36.     /** Date of the file creation. */
  37.     private DateTimeComponents creationDateComponents;

  38.     /** Time zone of the file creation. */
  39.     private String creationTimeZone;

  40.     /** Creation date as absolute date. */
  41.     private AbsoluteDate creationDate;

  42.     /** Digital Object Identifier.
  43.      * @since 12.0
  44.      */
  45.     private String doi;

  46.     /** License of use.
  47.      * @since 12.0
  48.      */
  49.     private String license;

  50.     /** Station information.
  51.      * @since 12.0
  52.      */
  53.     private String stationInformation;

  54.     /** Simple constructor.
  55.      * @param fileType file type
  56.      */
  57.     protected RinexBaseHeader(final RinexFileType fileType) {
  58.         this.fileType      = fileType;
  59.         this.formatVersion = Double.NaN;
  60.     }

  61.     /**
  62.      * Get the file type.
  63.      * @return file type
  64.      */
  65.     public RinexFileType getFileType() {
  66.         return fileType;
  67.     }

  68.     /**
  69.      * Getter for the format version.
  70.      * @return the format version
  71.      */
  72.     public double getFormatVersion() {
  73.         return formatVersion;
  74.     }

  75.     /**
  76.      * Setter for the format version.
  77.      * @param formatVersion the format version to set
  78.      */
  79.     public void setFormatVersion(final double formatVersion) {
  80.         this.formatVersion = formatVersion;
  81.     }

  82.     /**
  83.      * Getter for the satellite system.
  84.      * <p>
  85.      * Not specified for RINEX 2.X versions (value is null).
  86.      * </p>
  87.      * @return the satellite system
  88.      */
  89.     public SatelliteSystem getSatelliteSystem() {
  90.         return satelliteSystem;
  91.     }

  92.     /**
  93.      * Setter for the satellite system.
  94.      * @param satelliteSystem the satellite system to set
  95.      */
  96.     public void setSatelliteSystem(final SatelliteSystem satelliteSystem) {
  97.         this.satelliteSystem = satelliteSystem;
  98.     }

  99.     /**
  100.      * Getter for the program name.
  101.      * @return the program name
  102.      */
  103.     public String getProgramName() {
  104.         return programName;
  105.     }

  106.     /**
  107.      * Setter for the program name.
  108.      * @param programName the program name to set
  109.      */
  110.     public void setProgramName(final String programName) {
  111.         this.programName = programName;
  112.     }

  113.     /**
  114.      * Getter for the run/by name.
  115.      * @return the run/by name
  116.      */
  117.     public String getRunByName() {
  118.         return runByName;
  119.     }

  120.     /**
  121.      * Setter for the run/by name.
  122.      * @param runByName the run/by name to set
  123.      */
  124.     public void setRunByName(final String runByName) {
  125.         this.runByName = runByName;
  126.     }

  127.     /**
  128.      * Getter for the creation date of the file as a string.
  129.      * @return the creation date
  130.      */
  131.     public DateTimeComponents getCreationDateComponents() {
  132.         return creationDateComponents;
  133.     }

  134.     /**
  135.      * Setter for the creation date as a string.
  136.      * @param creationDateComponents the creation date to set
  137.      */
  138.     public void setCreationDateComponents(final DateTimeComponents creationDateComponents) {
  139.         this.creationDateComponents = creationDateComponents;
  140.     }

  141.     /**
  142.      * Getter for the creation time zone of the file as a string.
  143.      * @return the creation time zone as a string
  144.      */
  145.     public String getCreationTimeZone() {
  146.         return creationTimeZone;
  147.     }

  148.     /**
  149.      * Setter for the creation time zone.
  150.      * @param creationTimeZone the creation time zone to set
  151.      */
  152.     public void setCreationTimeZone(final String creationTimeZone) {
  153.         this.creationTimeZone = creationTimeZone;
  154.     }

  155.     /**
  156.      * Getter for the creation date.
  157.      * @return the creation date
  158.      */
  159.     public AbsoluteDate getCreationDate() {
  160.         return creationDate;
  161.     }

  162.     /**
  163.      * Setter for the creation date.
  164.      * @param creationDate the creation date to set
  165.      */
  166.     public void setCreationDate(final AbsoluteDate creationDate) {
  167.         this.creationDate = creationDate;
  168.     }

  169.     /**
  170.      *  Getter for the Digital Object Information.
  171.      * @return the Digital Object Information
  172.      * @since 12.0
  173.      */
  174.     public String getDoi() {
  175.         return doi;
  176.     }

  177.     /**
  178.      * Setter for the Digital Object Information.
  179.      * @param doi the Digital Object Information to set
  180.      * @since 12.0
  181.      */
  182.     public void setDoi(final String doi) {
  183.         this.doi = doi;
  184.     }

  185.     /**
  186.      *  Getter for the license of use.
  187.      * @return the license of use
  188.      * @since 12.0
  189.      */
  190.     public String getLicense() {
  191.         return license;
  192.     }

  193.     /**
  194.      * Setter for the license of use.
  195.      * @param license the license of use
  196.      * @since 12.0
  197.      */
  198.     public void setLicense(final String license) {
  199.         this.license = license;
  200.     }

  201.     /**
  202.      *  Getter for the station information.
  203.      * @return the station information
  204.      * @since 12.0
  205.      */
  206.     public String getStationInformation() {
  207.         return stationInformation;
  208.     }

  209.     /**
  210.      * Setter for the station information.
  211.      * @param stationInformation the station information to set
  212.      * @since 12.0
  213.      */
  214.     public void setStationInformation(final String stationInformation) {
  215.         this.stationInformation = stationInformation;
  216.     }

  217. }