1 /* Copyright 2024-2025 The Johns Hopkins University Applied Physics Laboratory
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.iirv.terms;
18
19 import org.orekit.files.iirv.terms.base.LongValuedIIRVTerm;
20
21 /**
22 * Source of the data message.
23 * <p>
24 * Valid values:
25 * <ul>
26 * <li> 1 = Nominal/planning
27 * <li> 2 = Real-time
28 * <li> 3 = Off-line
29 * <li> 4 = Off-line/mean
30 * </ul>
31 * <p>
32 *
33 * @author Nick LaFarge
34 * @since 13.0
35 */
36 public class DataSourceTerm extends LongValuedIIRVTerm {
37
38 /** Nominal/planning DataSource. */
39 public static final DataSourceTerm NOMINAL = new DataSourceTerm("1");
40
41 /** Real-time DataSource. */
42 public static final DataSourceTerm REAL_TIME = new DataSourceTerm("2");
43
44 /** Off-line DataSource. */
45 public static final DataSourceTerm OFFLINE = new DataSourceTerm("3");
46
47 /** Off-line/mean DataSource. */
48 public static final DataSourceTerm OFFLINE_MEAN = new DataSourceTerm("4");
49
50 /** The length of the IIRV term within the message. */
51 public static final int DATA_SOURCE_TERM_LENGTH = 1;
52
53 /** Regular expression that ensures the validity of string values for this term. */
54 public static final String DATA_SOURCE_TERM_PATTERN = "[1-4]";
55
56 /**
57 * Constructor.
58 * <p>
59 * See {@link LongValuedIIRVTerm#LongValuedIIRVTerm(String, String, int, boolean)}
60 *
61 * @param value value of the data source term
62 */
63 public DataSourceTerm(final String value) {
64 super(DATA_SOURCE_TERM_PATTERN, value, DATA_SOURCE_TERM_LENGTH, false);
65 }
66
67 /**
68 * Constructor.
69 * <p>
70 * See {@link LongValuedIIRVTerm#LongValuedIIRVTerm(String, long, int, boolean)}
71 *
72 * @param value value of the data source term
73 */
74 public DataSourceTerm(final long value) {
75 super(DATA_SOURCE_TERM_PATTERN, value, DATA_SOURCE_TERM_LENGTH, false);
76 }
77
78 }