1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.orekit.files.ccsds.ndm.odm.ocm;
18
19 import org.orekit.files.ccsds.utils.ContextBinding;
20 import org.orekit.files.ccsds.utils.lexical.ParseToken;
21 import org.orekit.utils.units.Unit;
22
23
24
25
26
27
28 public enum OcmMetadataKey {
29
30
31 CLASSIFICATION((token, context, container) -> token.processAsNormalizedString(container::setClassification)),
32
33
34
35 INTERNATIONAL_DESIGNATOR((token, context, container) -> token.processAsNormalizedString(container::setInternationalDesignator)),
36
37
38 CATALOG_NAME((token, context, container) -> token.processAsNormalizedString(container::setCatalogName)),
39
40
41 OBJECT_DESIGNATOR((token, context, container) -> token.processAsNormalizedString(container::setObjectDesignator)),
42
43
44 ALTERNATE_NAMES((token, context, container) -> token.processAsNormalizedList(container::setAlternateNames)),
45
46
47 ORIGINATOR_POC((token, context, container) -> token.processAsNormalizedString(container::setOriginatorPOC)),
48
49
50 ORIGINATOR_POSITION((token, context, container) -> token.processAsNormalizedString(container::setOriginatorPosition)),
51
52
53 ORIGINATOR_PHONE((token, context, container) -> token.processAsNormalizedString(container::setOriginatorPhone)),
54
55
56 ORIGINATOR_ADDRESS((token, context, container) -> token.processAsNormalizedString(container::setOriginatorAddress)),
57
58
59 TECH_ORG((token, context, container) -> token.processAsNormalizedString(container::setTechOrg)),
60
61
62 TECH_POC((token, context, container) -> token.processAsNormalizedString(container::setTechPOC)),
63
64
65 TECH_POSITION((token, context, container) -> token.processAsNormalizedString(container::setTechPosition)),
66
67
68 TECH_PHONE((token, context, container) -> token.processAsNormalizedString(container::setTechPhone)),
69
70
71 TECH_ADDRESS((token, context, container) -> token.processAsNormalizedString(container::setTechAddress)),
72
73
74 PREVIOUS_MESSAGE_ID((token, context, container) -> token.processAsNormalizedString(container::setPreviousMessageID)),
75
76
77 NEXT_MESSAGE_ID((token, context, container) -> token.processAsNormalizedString(container::setNextMessageID)),
78
79
80 ADM_MESSAGE_LINK((token, context, container) -> token.processAsNormalizedString(container::setAdmMessageLink)),
81
82
83 CDM_MESSAGE_LINK((token, context, container) -> token.processAsNormalizedString(container::setCdmMessageLink)),
84
85
86 PRM_MESSAGE_LINK((token, context, container) -> token.processAsNormalizedString(container::setPrmMessageLink)),
87
88
89 RDM_MESSAGE_LINK((token, context, container) -> token.processAsNormalizedString(container::setRdmMessageLink)),
90
91
92 TDM_MESSAGE_LINK((token, context, container) -> token.processAsNormalizedString(container::setTdmMessageLink)),
93
94
95 OPERATOR((token, context, container) -> token.processAsNormalizedString(container::setOperator)),
96
97
98 OWNER((token, context, container) -> token.processAsNormalizedString(container::setOwner)),
99
100
101 COUNTRY((token, context, container) -> token.processAsNormalizedString(container::setCountry)),
102
103
104 CONSTELLATION((token, context, container) -> token.processAsNormalizedString(container::setConstellation)),
105
106
107
108
109 OBJECT_TYPE((token, context, container) -> token.processAsEnum(ObjectType.class, container::setObjectType)),
110
111
112
113 EPOCH_TZERO((token, context, container) -> token.processAsDate(container::setEpochT0, context)),
114
115
116
117
118 OPS_STATUS((token, context, container) -> token.processAsEnum(OpsStatus.class, container::setOpsStatus)),
119
120
121
122
123 ORBIT_CATEGORY((token, context, container) -> token.processAsEnum(OrbitCategory.class, container::setOrbitCategory)),
124
125
126
127 OCM_DATA_ELEMENTS((token, context, container) -> token.processAsUppercaseList(container::setOcmDataElements)),
128
129
130 SCLK_OFFSET_AT_EPOCH((token, context, container) -> token.processAsDouble(Unit.SECOND, context.getParsedUnitsBehavior(),
131 container::setSclkOffsetAtEpoch)),
132
133
134 SCLK_SEC_PER_SI_SEC((token, context, container) -> token.processAsDouble(Unit.SECOND, context.getParsedUnitsBehavior(),
135 container::setSclkSecPerSISec)),
136
137
138 PREVIOUS_MESSAGE_EPOCH((token, context, container) -> token.processAsDate(container::setPreviousMessageEpoch, context)),
139
140
141 NEXT_MESSAGE_EPOCH((token, context, container) -> token.processAsDate(container::setNextMessageEpoch, context)),
142
143
144 START_TIME((token, context, container) -> token.processAsDate(container::setStartTime, context)),
145
146
147 STOP_TIME((token, context, container) -> token.processAsDate(container::setStopTime, context)),
148
149
150 TIME_SPAN((token, context, container) -> token.processAsDouble(Unit.DAY, context.getParsedUnitsBehavior(),
151 container::setTimeSpan)),
152
153
154 TAIMUTC_AT_TZERO((token, context, container) -> token.processAsDouble(Unit.SECOND, context.getParsedUnitsBehavior(),
155 container::setTaimutcT0)),
156
157
158 UT1MUTC_AT_TZERO((token, context, container) -> token.processAsDouble(Unit.SECOND, context.getParsedUnitsBehavior(),
159 container::setUt1mutcT0)),
160
161
162 EOP_SOURCE((token, context, container) -> token.processAsNormalizedString(container::setEopSource)),
163
164
165 INTERP_METHOD_EOP((token, context, container) -> token.processAsNormalizedString(container::setInterpMethodEOP)),
166
167
168 CELESTIAL_SOURCE((token, context, container) -> token.processAsNormalizedString(container::setCelestialSource));
169
170
171 private final TokenProcessor processor;
172
173
174
175
176 OcmMetadataKey(final TokenProcessor processor) {
177 this.processor = processor;
178 }
179
180
181
182
183
184
185
186 public boolean process(final ParseToken token, final ContextBinding context, final OcmMetadata container) {
187 return processor.process(token, context, container);
188 }
189
190
191 interface TokenProcessor {
192
193
194
195
196
197
198 boolean process(ParseToken token, ContextBinding context, OcmMetadata container);
199 }
200
201 }