Interface XmlTokenBuilder

  • All Known Implementing Classes:
    MessageVersionXmlTokenBuilder, RegularXmlTokenBuilder, RotationXmlTokenBuilder, UserDefinedXmlTokenBuilder

    public interface XmlTokenBuilder
    Builder for building ParseToken from XML elements.

    The regular handling of regular XML elements is to used the element name as the token name, the element content as the token content and the "units" attribute for the units. In some cases however the token name should be extracted from attributes, and sometimes even the content. This interface allows to define all these behaviors, by providing specialized builders to the lexical analyzer when it calls their getSpecialXmlElementsHandlers method.

    Since:
    11.0
    Author:
    Luc Maisonobe
    • Method Detail

      • buildTokens

        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.
        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
        Since:
        12.0