Class DocbookUtils


  • public final class DocbookUtils
    extends java.lang.Object
    Utility methods for Doxia Docbook Parser and Sink.
    Since:
    1.1.1
    Author:
    ltheussl
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String docbookListNumbering​(int numbering)
      Convert a doxia numbering style to a docbook ordered-list numbering style.
      static int doxiaListNumbering​(java.lang.String style)
      Convert a docbook ordered-list numbering style to a doxia numbering style.
      static java.lang.String doxiaTableFrameAttribute​(java.lang.String frame)
      Translate a given Docbook table frame attribute value to a valid Doxia table frame attribute value.
      static char trademarkFromClass​(java.lang.String trade)
      Get a trademark character from a class attribute.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • doxiaTableFrameAttribute

        public static java.lang.String doxiaTableFrameAttribute​(java.lang.String frame)
        Translate a given Docbook table frame attribute value to a valid Doxia table frame attribute value.

        The input has to be one of "all", "bottom", "none", "sides", "top" or "topbot", otherwise an IllegalArgumentException is thrown.

        The corresponding output values are "box", "below", "void", "vsides", "above" and "hsides".

        Parameters:
        frame - a valid docbook table frame attribute as specified above, otherwise an IllegalArgumentException is thrown.
        Returns:
        a valid Doxia table frame attribute as specified above.
      • doxiaListNumbering

        public static int doxiaListNumbering​(java.lang.String style)
        Convert a docbook ordered-list numbering style to a doxia numbering style.

        The input has to be one of the style constants defined in SimplifiedDocbookMarkup, otherwise an IllegalArgumentException is thrown.

        The output is one of the numbering constants defined in Sink.

        Parameters:
        style - a docbook ordered-list numbering style.
        Returns:
        a doxia numbering style.
      • docbookListNumbering

        public static java.lang.String docbookListNumbering​(int numbering)
        Convert a doxia numbering style to a docbook ordered-list numbering style.

        The input has to be one of the numbering constants defined in Sink, otherwise an IllegalArgumentException is thrown.

        The output is one of the style constants defined in SimplifiedDocbookMarkup.

        Parameters:
        numbering - a doxia numbering style.
        Returns:
        a docbook ordered-list numbering style.
      • trademarkFromClass

        public static char trademarkFromClass​(java.lang.String trade)
        Get a trademark character from a class attribute.

        The input String has to be one of "registered", "copyright", "service" or "trade" otherwise an IllegalArgumentException is thrown.

        The corresponding output is '®', '©', '℠' or '™'.

        Parameters:
        trade - a valid class atribute for the docbook <trademark> tag.
        Returns:
        the corresponding unicode character.