Class OemParser
- java.lang.Object
-
- org.orekit.files.ccsds.utils.parsing.AbstractMessageParser<T>
-
- org.orekit.files.ccsds.utils.parsing.AbstractConstituentParser<OdmHeader,T,P>
-
- org.orekit.files.ccsds.ndm.odm.OdmParser<Oem,OemParser>
-
- org.orekit.files.ccsds.ndm.odm.oem.OemParser
-
- All Implemented Interfaces:
MessageParser<Oem>
,EphemerisFileParser<Oem>
public class OemParser extends OdmParser<Oem,OemParser> implements EphemerisFileParser<Oem>
A parser for the CCSDS OEM (Orbit Ephemeris Message).Note than starting with Orekit 11.0, CCSDS message parsers are mutable objects that gather the data being parsed, until the message is complete and the
parseMessage
method has returned. This implies that parsers should not be used in a multi-thread context. The recommended way to use parsers is to either dedicate one parser for each message and drop it afterwards, or to use a single-thread loop.- Since:
- 6.1
- Author:
- sports
-
-
Constructor Summary
Constructors Constructor Description OemParser(IERSConventions conventions, boolean simpleEOP, DataContext dataContext, AbsoluteDate missionReferenceDate, double mu, int defaultInterpolationDegree, ParsedUnitsBehavior parsedUnitsBehavior, Function<ParseToken,List<ParseToken>>[] filters)
Complete constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Oem
build()
Build the file from parsed entries.boolean
finalizeData()
Finalize data after parsing.boolean
finalizeHeader()
Finalize header after parsing.boolean
finalizeMetadata()
Finalize metadata after parsing.OdmHeader
getHeader()
Get file header to fill.boolean
inData()
Acknowledge data parsing has started.boolean
inHeader()
Acknowledge header parsing has started.boolean
inMetadata()
Acknowledge metada parsing has started.Oem
parse(DataSource source)
Parse an ephemeris file from a data source.boolean
prepareData()
Prepare data for parsing.boolean
prepareHeader()
Prepare header for parsing.boolean
prepareMetadata()
Prepare metadata for parsing.void
reset(FileFormat fileFormat)
Reset parser to initial state before parsing.-
Methods inherited from class org.orekit.files.ccsds.ndm.odm.OdmParser
getMissionReferenceDate, getMuSet, getSelectedMu, setMuCreated, setMuParsed
-
Methods inherited from class org.orekit.files.ccsds.utils.parsing.AbstractConstituentParser
getConventions, getDataContext, getParsedUnitsBehavior, isSimpleEOP
-
Methods inherited from class org.orekit.files.ccsds.utils.parsing.AbstractMessageParser
anticipateNext, getCurrent, getFileFormat, getFormatVersionKey, getSpecialXmlElementsBuilders, parseMessage, process, reset, setEndTagSeen, setFallback, wasEndTagSeen
-
-
-
-
Constructor Detail
-
OemParser
public OemParser(IERSConventions conventions, boolean simpleEOP, DataContext dataContext, AbsoluteDate missionReferenceDate, double mu, int defaultInterpolationDegree, ParsedUnitsBehavior parsedUnitsBehavior, Function<ParseToken,List<ParseToken>>[] filters)
Complete constructor.Calling this constructor directly is not recommended. Users should rather use
parserBuilder.buildOemParser()
.- Parameters:
conventions
- IERS ConventionssimpleEOP
- if true, tidal effects are ignored when interpolating EOPdataContext
- used to retrieve frames, time scales, etc.missionReferenceDate
- reference date for Mission Elapsed Time or Mission Relative Time time systems (may be null if time system is absolute)mu
- gravitational coefficientdefaultInterpolationDegree
- default interpolation degreeparsedUnitsBehavior
- behavior to adopt for handling parsed unitsfilters
- filters to apply to parse tokens- Since:
- 12.0
-
-
Method Detail
-
parse
public Oem parse(DataSource source)
Parse an ephemeris file from a data source.- Specified by:
parse
in interfaceEphemerisFileParser<Oem>
- Parameters:
source
- source providing the data to parse- Returns:
- a parsed ephemeris file.
-
getHeader
public OdmHeader getHeader()
Get file header to fill.- Specified by:
getHeader
in classAbstractConstituentParser<OdmHeader,Oem,OemParser>
- Returns:
- file header to fill
-
reset
public void reset(FileFormat fileFormat)
Reset parser to initial state before parsing.- Specified by:
reset
in interfaceMessageParser<Oem>
- Parameters:
fileFormat
- format of the file ready to be parsed
-
prepareHeader
public boolean prepareHeader()
Prepare header for parsing.- Specified by:
prepareHeader
in classAbstractConstituentParser<OdmHeader,Oem,OemParser>
- Returns:
- true if parser was able to perform the action
-
inHeader
public boolean inHeader()
Acknowledge header parsing has started.- Specified by:
inHeader
in classAbstractConstituentParser<OdmHeader,Oem,OemParser>
- Returns:
- true if parser was able to perform the action
-
finalizeHeader
public boolean finalizeHeader()
Finalize header after parsing.- Specified by:
finalizeHeader
in classAbstractConstituentParser<OdmHeader,Oem,OemParser>
- Returns:
- true if parser was able to perform the action
-
prepareMetadata
public boolean prepareMetadata()
Prepare metadata for parsing.- Specified by:
prepareMetadata
in classAbstractConstituentParser<OdmHeader,Oem,OemParser>
- Returns:
- true if parser was able to perform the action
-
inMetadata
public boolean inMetadata()
Acknowledge metada parsing has started.- Specified by:
inMetadata
in classAbstractConstituentParser<OdmHeader,Oem,OemParser>
- Returns:
- true if parser was able to perform the action
-
finalizeMetadata
public boolean finalizeMetadata()
Finalize metadata after parsing.- Specified by:
finalizeMetadata
in classAbstractConstituentParser<OdmHeader,Oem,OemParser>
- Returns:
- true if parser was able to perform the action
-
prepareData
public boolean prepareData()
Prepare data for parsing.- Specified by:
prepareData
in classAbstractConstituentParser<OdmHeader,Oem,OemParser>
- Returns:
- true if parser was able to perform the action
-
inData
public boolean inData()
Acknowledge data parsing has started.- Specified by:
inData
in classAbstractConstituentParser<OdmHeader,Oem,OemParser>
- Returns:
- true if parser was able to perform the action
-
finalizeData
public boolean finalizeData()
Finalize data after parsing.- Specified by:
finalizeData
in classAbstractConstituentParser<OdmHeader,Oem,OemParser>
- Returns:
- true if parser was able to perform the action
-
build
public Oem build()
Build the file from parsed entries.- Specified by:
build
in interfaceMessageParser<Oem>
- Returns:
- parsed file
-
-