Class MessageVersionXmlTokenBuilder

  • All Implemented Interfaces:
    XmlTokenBuilder

    public class MessageVersionXmlTokenBuilder
    extends Object
    implements XmlTokenBuilder
    Builder for the root element with CCSDS message version.

    All parsers for CCSDS ADM, ODM and TDM messages need to handle the root level XML element specially. OPM file for example have a root element of the form:

       <opm id="CCSDS_OPM_VERS" verion="3.0">
     

    This token builder will generate two parse tokens from this root element:

    1. one with name set to "opm", type set to TokenType.START and no content
    2. one with name set to "CCSDS_OPM_VERS", type set to TokenType.ENTRY and content set to "3.0"
    Since:
    11.0
    Author:
    Luc Maisonobe
    • Constructor Detail

      • MessageVersionXmlTokenBuilder

        public MessageVersionXmlTokenBuilder()
        Empty constructor.

        This constructor is not strictly necessary, but it prevents spurious javadoc warnings with JDK 18 and later.

        Since:
        12.0
    • Method Detail

      • buildTokens

        public List<ParseToken> buildTokens​(boolean startTag,
                                            boolean isLeaf,
                                            String qName,
                                            String content,
                                            Map<String,​String> attributes,
                                            int lineNumber,
                                            String fileName)
        Create a list of parse tokens.
        Specified by:
        buildTokens in interface XmlTokenBuilder
        Parameters:
        startTag - if true we are parsing the start tag from an XML element
        isLeaf - if true and startTag is false, we are processing the end tag of a leaf XML element
        qName - element qualified name
        content - element content
        attributes - element attributes
        lineNumber - number of the line in the CCSDS data message
        fileName - name of the file
        Returns:
        list of parse tokens