Class HtmlTemplateOutputHandler

    • Constructor Detail

      • HtmlTemplateOutputHandler

        public HtmlTemplateOutputHandler()
    • Method Detail

      • formatReplaceableHTML

        public static String formatReplaceableHTML​(String text,
                                                   String id)
        Format HTML for a replaceable string
        Parameters:
        text - text for the optional license string
        id - ID used for the div
        Returns:
        a replaceable string
      • formatReplaceabledHTML

        @Deprecated
        public static String formatReplaceabledHTML​(String text,
                                                    String id)
        Deprecated.
        Format HTML for a replaceable string
        Parameters:
        text - text for the optional license string
        id - ID used for the div
        Returns:
        a replaceable string
      • escapeIdString

        public static String escapeIdString​(String id)
        Escape the ID string to conform to the legal characters for an HTML ID string
        Parameters:
        id - an SPDX ID string
        Returns:
        the id escaped for HTML
      • getHtml

        public String getHtml()
        Returns:
        HTML result
      • formatStartOptionalHTML

        public static String formatStartOptionalHTML​(String id)
        Format HTML for an optional string
        Parameters:
        id - ID used for the div
        Returns:
        a formated id for use in the div
      • formatEndOptionalHTML

        public static String formatEndOptionalHTML​(boolean inParagraph)
        Parameters:
        inParagraph - true if in a paragraph
        Returns:
        a string for formatting the end of an Optional HTML element