Package org.orekit.files.ccsds.ndm
Class NdmParser
- java.lang.Object
-
- org.orekit.files.ccsds.utils.parsing.AbstractMessageParser<Ndm>
-
- org.orekit.files.ccsds.ndm.NdmParser
-
- All Implemented Interfaces:
MessageParser<Ndm>
public class NdmParser extends AbstractMessageParser<Ndm>
A parser for the CCSDS NDM (Navigation Data Message).- Since:
- 11.0
- Author:
- Luc Maisonobe
-
-
Constructor Summary
Constructors Constructor Description NdmParser(ParserBuilder builder, Function<ParseToken,List<ParseToken>>[] filters)
Simple constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addComment(String comment)
Add comment.Ndm
build()
Build the file from parsed entries.Map<String,XmlTokenBuilder>
getSpecialXmlElementsBuilders()
Get the non-default token builders for special XML elements.void
reset(FileFormat fileFormat)
Reset parser to initial state before parsing.-
Methods inherited from class org.orekit.files.ccsds.utils.parsing.AbstractMessageParser
anticipateNext, getCurrent, getFileFormat, getFormatVersionKey, parseMessage, process, reset, setEndTagSeen, setFallback, wasEndTagSeen
-
-
-
-
Constructor Detail
-
NdmParser
public NdmParser(ParserBuilder builder, Function<ParseToken,List<ParseToken>>[] filters)
Simple constructor.Calling this constructor directly is not recommended. Users should rather use
parserBuilder.buildNdmParser()
.- Parameters:
builder
- builder for the constituents parsersfilters
- 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<Ndm>
- Overrides:
getSpecialXmlElementsBuilders
in classAbstractMessageParser<Ndm>
- Returns:
- map of token builders for special XML elements (keyed by XML element name)
-
reset
public void reset(FileFormat fileFormat)
Reset parser to initial state before parsing.- Parameters:
fileFormat
- format of the file ready to be parsed
-
build
public Ndm build()
Build the file from parsed entries.- Returns:
- parsed file
-
addComment
public boolean addComment(String comment)
Add comment.Comments are accepted only at start. Once other content is stored in the same section, comments are refused.
- Parameters:
comment
- comment line- Returns:
- true if comment was accepted
-
-