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.gnss.metric.ntrip;
18
19 import java.util.ArrayList;
20 import java.util.List;
21
22 /** Source table for ntrip streams retrieval.
23 * @author Luc Maisonobe
24 * @since 11.0
25 */
26 public class SourceTable {
27
28 /** Flags set by server. */
29 private final String ntripFlags;
30
31 /** Casters records. */
32 private final List<CasterRecord> casters;
33
34 /** Networks records. */
35 private final List<NetworkRecord> networks;
36
37 /** Data stream records. */
38 private final List<DataStreamRecord> dataStreams;
39
40 /** Build a source table by parsing all records.
41 * @param ntripFlags flags set by the server
42 */
43 SourceTable(final String ntripFlags) {
44 this.ntripFlags = ntripFlags;
45 this.casters = new ArrayList<>();
46 this.networks = new ArrayList<>();
47 this.dataStreams = new ArrayList<>();
48 }
49
50 /** Add a caster record.
51 * @param caster caster record to add
52 */
53 void addCasterRecord(final CasterRecord caster) {
54 casters.add(caster);
55 }
56
57 /** Add a network record.
58 * @param network network record to add
59 */
60 void addNetworkRecord(final NetworkRecord network) {
61 networks.add(network);
62 }
63
64 /** Add a data stream record.
65 * @param dataStream data stream record to add
66 */
67 void addDataStreamRecord(final DataStreamRecord dataStream) {
68 dataStreams.add(dataStream);
69 }
70
71 /** Get the flags set by server.
72 * @return flags set by server
73 */
74 public String getNtripFlags() {
75 return ntripFlags;
76 }
77
78 /** Get the casters records.
79 * @return casters records
80 */
81 public List<CasterRecord> getCasters() {
82 return casters;
83 }
84
85 /** Get the networks records.
86 * @return networks records
87 */
88 public List<NetworkRecord> getNetworks() {
89 return networks;
90 }
91
92 /** Get the data streams records.
93 * @return data streams records
94 */
95 public List<DataStreamRecord> getDataStreams() {
96 return dataStreams;
97 }
98
99 }