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
Constructors Modifier Constructor Description protected
AbstractConstituentParser(String root, String formatVersionKey, IERSConventions conventions, boolean simpleEOP, DataContext dataContext, ParsedUnitsBehavior parsedUnitsBehavior, Function<ParseToken,List<ParseToken>>[] filters)
Complete constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract boolean
finalizeData()
Finalize data after parsing.abstract boolean
finalizeHeader()
Finalize header after parsing.abstract boolean
finalizeMetadata()
Finalize metadata after parsing.IERSConventions
getConventions()
Get IERS conventions.DataContext
getDataContext()
Get the data context used for getting frames, time scales, and celestial bodies.abstract H
getHeader()
Get file header to fill.ParsedUnitsBehavior
getParsedUnitsBehavior()
Get the behavior to adopt for handling parsed units.abstract boolean
inData()
Acknowledge data parsing has started.abstract boolean
inHeader()
Acknowledge header parsing has started.abstract boolean
inMetadata()
Acknowledge metada parsing has started.boolean
isSimpleEOP()
Get EOP interpolation method.abstract boolean
prepareData()
Prepare data for parsing.abstract boolean
prepareHeader()
Prepare header for parsing.abstract boolean
prepareMetadata()
Prepare metadata for parsing.-
Methods inherited from class org.orekit.files.ccsds.utils.parsing.AbstractMessageParser
anticipateNext, getCurrent, getFileFormat, getFormatVersionKey, getSpecialXmlElementsBuilders, parseMessage, process, reset, setEndTagSeen, setFallback, wasEndTagSeen
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.orekit.files.ccsds.utils.lexical.MessageParser
build, reset
-
-
-
-
Constructor Detail
-
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
-
-
Method Detail
-
getParsedUnitsBehavior
public ParsedUnitsBehavior getParsedUnitsBehavior()
Get the behavior to adopt for handling parsed units.- Returns:
- behavior to adopt for handling parsed units
-
getConventions
public IERSConventions 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
public DataContext getDataContext()
Get the data context used for getting frames, time scales, and celestial bodies.- Returns:
- the data context.
-
getHeader
public abstract H 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
-
-