Class AbstractConstituentParser<H extends Header,T extends NdmConstituent<H,?>,P extends AbstractConstituentParser<H,T,?>>
java.lang.Object
org.orekit.files.ccsds.utils.parsing.AbstractMessageParser<T>
org.orekit.files.ccsds.utils.parsing.AbstractConstituentParser<H,T,P>
- Type Parameters:
H- type of the headerT- type of the fileP- type of the parser
- All Implemented Interfaces:
MessageParser<T>
public abstract class AbstractConstituentParser<H extends Header,T extends NdmConstituent<H,?>,P extends AbstractConstituentParser<H,T,?>>
extends AbstractMessageParser<T>
Parser for CCSDS messages.
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:
- 11.0
- Author:
- Luc Maisonobe
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractConstituentParser(String root, String formatVersionKey, IERSConventions conventions, boolean simpleEOP, DataContext dataContext, ParsedUnitsBehavior parsedUnitsBehavior, Function<ParseToken, List<ParseToken>>[] filters) Complete constructor.protectedAbstractConstituentParser(String root, String formatVersionKey, IERSConventions conventions, boolean simpleEOP, DataContext dataContext, ParsedUnitsBehavior parsedUnitsBehavior, Function<ParseToken, List<ParseToken>>[] filters, CcsdsFrameMapper frameMapper) Complete constructor. -
Method Summary
Modifier and TypeMethodDescriptionabstract booleanFinalize data after parsing.abstract booleanFinalize header after parsing.abstract booleanFinalize metadata after parsing.Get IERS conventions.Get the data context used for getting frames, time scales, and celestial bodies.Get the mapping between a CCSDS frame and aFrame.abstract HGet file header to fill.Get the behavior to adopt for handling parsed units.abstract booleaninData()Acknowledge data parsing has started.abstract booleaninHeader()Acknowledge header parsing has started.abstract booleanAcknowledge metada parsing has started.booleanGet EOP interpolation method.abstract booleanPrepare data for parsing.abstract booleanPrepare header for parsing.abstract booleanPrepare metadata for parsing.Methods inherited from class org.orekit.files.ccsds.utils.parsing.AbstractMessageParser
anticipateNext, getCurrent, getFileFormat, getFormatVersionKey, getSpecialXmlElementsBuilders, parseMessage, process, reset, setEndTagSeen, setFallback, wasEndTagSeenMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.orekit.files.ccsds.utils.lexical.MessageParser
build, reset
-
Constructor Details
-
AbstractConstituentParser
protected AbstractConstituentParser(String root, String formatVersionKey, IERSConventions conventions, boolean simpleEOP, DataContext dataContext, ParsedUnitsBehavior parsedUnitsBehavior, Function<ParseToken, List<ParseToken>>[] filters) Complete constructor.- Parameters:
root- root element for XML filesformatVersionKey- key for format versionconventions- IERS ConventionssimpleEOP- if true, tidal effects are ignored when interpolating EOPdataContext- used to retrieve frames and time scalesparsedUnitsBehavior- behavior to adopt for handling parsed unitsfilters- filters to apply to parse tokens- Since:
- 12.0
-
AbstractConstituentParser
protected AbstractConstituentParser(String root, String formatVersionKey, IERSConventions conventions, boolean simpleEOP, DataContext dataContext, ParsedUnitsBehavior parsedUnitsBehavior, Function<ParseToken, List<ParseToken>>[] filters, CcsdsFrameMapper frameMapper) Complete constructor.- Parameters:
root- root element for XML filesformatVersionKey- key for format versionconventions- IERS ConventionssimpleEOP- if true, tidal effects are ignored when interpolating EOPdataContext- used to retrieve frames and time scalesparsedUnitsBehavior- behavior to adopt for handling parsed unitsfilters- filters to apply to parse tokensframeMapper- for creating an OrekitFrame.- Since:
- 13.1.5
-
-
Method Details
-
getParsedUnitsBehavior
Get the behavior to adopt for handling parsed units.- Returns:
- behavior to adopt for handling parsed units
-
getConventions
Get IERS conventions.- Returns:
- IERS conventions to use while parsing
-
isSimpleEOP
public boolean isSimpleEOP()Get EOP interpolation method.- Returns:
- true if tidal effects are ignored when interpolating EOP
-
getDataContext
Get the data context used for getting frames, time scales, and celestial bodies.- Returns:
- the data context.
-
getFrameMapper
Get the mapping between a CCSDS frame and aFrame.- Returns:
- the frame mapper.
- Since:
- 13.1.5
-
getHeader
Get file header to fill.- Returns:
- file header to fill
-
prepareHeader
public abstract boolean prepareHeader()Prepare header for parsing.- Returns:
- true if parser was able to perform the action
-
inHeader
public abstract boolean inHeader()Acknowledge header parsing has started.- Returns:
- true if parser was able to perform the action
-
finalizeHeader
public abstract boolean finalizeHeader()Finalize header after parsing.- Returns:
- true if parser was able to perform the action
-
prepareMetadata
public abstract boolean prepareMetadata()Prepare metadata for parsing.- Returns:
- true if parser was able to perform the action
-
inMetadata
public abstract boolean inMetadata()Acknowledge metada parsing has started.- Returns:
- true if parser was able to perform the action
-
finalizeMetadata
public abstract boolean finalizeMetadata()Finalize metadata after parsing.- Returns:
- true if parser was able to perform the action
-
prepareData
public abstract boolean prepareData()Prepare data for parsing.- Returns:
- true if parser was able to perform the action
-
inData
public abstract boolean inData()Acknowledge data parsing has started.- Returns:
- true if parser was able to perform the action
-
finalizeData
public abstract boolean finalizeData()Finalize data after parsing.- Returns:
- true if parser was able to perform the action
-