Class AbstractConstituentParser<H extends Header,​T extends NdmConstituent<H,​?>,​P extends AbstractConstituentParser<H,​T,​?>>

  • Type Parameters:
    H - type of the header
    T - type of the file
    P - type of the parser
    All Implemented Interfaces:
    MessageParser<T>
    Direct Known Subclasses:
    AdmParser, CdmParser, OdmParser, TdmParser

    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 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 files
        formatVersionKey - key for format version
        conventions - IERS Conventions
        simpleEOP - if true, tidal effects are ignored when interpolating EOP
        dataContext - used to retrieve frames and time scales
        parsedUnitsBehavior - behavior to adopt for handling parsed units
        filters - 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