Class AcmParser
- java.lang.Object
-
- org.orekit.files.ccsds.utils.parsing.AbstractMessageParser<T>
-
- org.orekit.files.ccsds.utils.parsing.AbstractConstituentParser<AdmHeader,T,P>
-
- org.orekit.files.ccsds.ndm.adm.AdmParser<Acm,AcmParser>
-
- org.orekit.files.ccsds.ndm.adm.acm.AcmParser
-
- All Implemented Interfaces:
MessageParser<Acm>
,AttitudeEphemerisFileParser<Acm>
public class AcmParser extends AdmParser<Acm,AcmParser> implements AttitudeEphemerisFileParser<Acm>
A parser for the CCSDS ACM (Attitude Comprehensive Message).- Since:
- 12.0
- Author:
- Luc Maisonobe
-
-
Constructor Summary
Constructors Constructor Description AcmParser(IERSConventions conventions, boolean simpleEOP, DataContext dataContext, ParsedUnitsBehavior parsedUnitsBehavior, Function<ParseToken,List<ParseToken>>[] filters)
Complete constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Acm
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.AdmHeader
getHeader()
Get file header to fill.Map<String,XmlTokenBuilder>
getSpecialXmlElementsBuilders()
Get the non-default token builders for special XML elements.boolean
inData()
Acknowledge data parsing has started.boolean
inHeader()
Acknowledge header parsing has started.boolean
inMetadata()
Acknowledge metada parsing has started.Acm
parse(DataSource source)
Parse an attitude 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.adm.AdmParser
getMissionReferenceDate
-
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, parseMessage, process, reset, setEndTagSeen, setFallback, wasEndTagSeen
-
-
-
-
Constructor Detail
-
AcmParser
public AcmParser(IERSConventions conventions, boolean simpleEOP, DataContext dataContext, ParsedUnitsBehavior parsedUnitsBehavior, Function<ParseToken,List<ParseToken>>[] filters)
Complete constructor.Calling this constructor directly is not recommended. Users should rather use
parserBuilder.buildAcmParser()
.- Parameters:
conventions
- IERS ConventionssimpleEOP
- if true, tidal effects are ignored when interpolating EOPdataContext
- used to retrieve frames, time scales, etc.parsedUnitsBehavior
- behavior to adopt for handling parsed unitsfilters
- filters to apply to parse tokens- Since:
- 12.0
-
-
Method Detail
-
getSpecialXmlElementsBuilders
public Map<String,XmlTokenBuilder> getSpecialXmlElementsBuilders()
Get the non-default token builders for special XML elements.- Specified by:
getSpecialXmlElementsBuilders
in interfaceMessageParser<Acm>
- Overrides:
getSpecialXmlElementsBuilders
in classAdmParser<Acm,AcmParser>
- Returns:
- map of token builders for special XML elements (keyed by XML element name)
-
parse
public Acm parse(DataSource source)
Parse an attitude ephemeris file from a data source.- Specified by:
parse
in interfaceAttitudeEphemerisFileParser<Acm>
- Parameters:
source
- source providing the data to parse- Returns:
- a parsed attitude ephemeris file.
-
getHeader
public AdmHeader getHeader()
Get file header to fill.- Specified by:
getHeader
in classAbstractConstituentParser<AdmHeader,Acm,AcmParser>
- Returns:
- file header to fill
-
reset
public void reset(FileFormat fileFormat)
Reset parser to initial state before parsing.- Specified by:
reset
in interfaceMessageParser<Acm>
- Parameters:
fileFormat
- format of the file ready to be parsed
-
prepareHeader
public boolean prepareHeader()
Prepare header for parsing.- Specified by:
prepareHeader
in classAbstractConstituentParser<AdmHeader,Acm,AcmParser>
- Returns:
- true if parser was able to perform the action
-
inHeader
public boolean inHeader()
Acknowledge header parsing has started.- Specified by:
inHeader
in classAbstractConstituentParser<AdmHeader,Acm,AcmParser>
- Returns:
- true if parser was able to perform the action
-
finalizeHeader
public boolean finalizeHeader()
Finalize header after parsing.- Specified by:
finalizeHeader
in classAbstractConstituentParser<AdmHeader,Acm,AcmParser>
- Returns:
- true if parser was able to perform the action
-
prepareMetadata
public boolean prepareMetadata()
Prepare metadata for parsing.- Specified by:
prepareMetadata
in classAbstractConstituentParser<AdmHeader,Acm,AcmParser>
- Returns:
- true if parser was able to perform the action
-
inMetadata
public boolean inMetadata()
Acknowledge metada parsing has started.- Specified by:
inMetadata
in classAbstractConstituentParser<AdmHeader,Acm,AcmParser>
- Returns:
- true if parser was able to perform the action
-
finalizeMetadata
public boolean finalizeMetadata()
Finalize metadata after parsing.- Specified by:
finalizeMetadata
in classAbstractConstituentParser<AdmHeader,Acm,AcmParser>
- Returns:
- true if parser was able to perform the action
-
prepareData
public boolean prepareData()
Prepare data for parsing.- Specified by:
prepareData
in classAbstractConstituentParser<AdmHeader,Acm,AcmParser>
- Returns:
- true if parser was able to perform the action
-
inData
public boolean inData()
Acknowledge data parsing has started.- Specified by:
inData
in classAbstractConstituentParser<AdmHeader,Acm,AcmParser>
- Returns:
- true if parser was able to perform the action
-
finalizeData
public boolean finalizeData()
Finalize data after parsing.- Specified by:
finalizeData
in classAbstractConstituentParser<AdmHeader,Acm,AcmParser>
- Returns:
- true if parser was able to perform the action
-
build
public Acm build()
Build the file from parsed entries.- Specified by:
build
in interfaceMessageParser<Acm>
- Returns:
- parsed file
-
-