Enum Class MathMLGranularity

java.lang.Object
java.lang.Enum<MathMLGranularity>
com.deltaxml.docbook.config.MathMLGranularity
All Implemented Interfaces:
com.deltaxml.docbook.DocBookCompareDisplayable, Serializable, Comparable<MathMLGranularity>, Constable

public enum MathMLGranularity extends Enum<MathMLGranularity> implements com.deltaxml.docbook.DocBookCompareDisplayable

Specifies the granularity at which the differences between the two MathML expressions will be represented from the DocumentComparator.

Since:
11.0
  • Enum Constant Details

    • ADJACENT

      public static final MathMLGranularity ADJACENT

      Reports the differences to the MathML by repeating A and B MathML inputs adjacent to each other. Whole MathML sections will be highlighted by background colours (#ffcbcb for A and #bbffbb for B) by using a style attribute 'mathbackground'. The advantage of this result is that the MathML will always render correctly if the inputs rendered correctly. Please note that repeating the equation means that it will take up twice as much space so this isn't necessarily the best option if pagination or layout is an issue.

    • DETAILED_ADJACENT

      public static final MathMLGranularity DETAILED_ADJACENT

      Reports the differences to the MathML by repeating the A and B MathML inputs adjacent to each other, with individual changes highlighted. The individual changes will be highlighted by background colours (#ffcbcb for A and #bbffbb for B) by using a style attribute 'mathbackground'.

    • INLINE

      public static final MathMLGranularity INLINE

      Reports the differences within the MathML without duplicating A and B. However, due to the nature of some MathML elements and their required argument types, it may be necessary to present the changes at a 'higher' level than that which they occurred at. The inline changes will be highlighted by background colours (#ffcbcb for A and #bbffbb for B) by using a style attribute 'mathbackground'.

  • Method Details

    • values

      public static MathMLGranularity[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static MathMLGranularity valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getDisplayName

      public String getDisplayName()

      Returns the user-friendly String name of the MathMLGranularity.

      Specified by:
      getDisplayName in interface com.deltaxml.docbook.DocBookCompareDisplayable
      Returns:
      a user-friendly String representing the MathMLGranularity object
    • getDisplayDescription

      public String getDisplayDescription()

      Returns the user-friendly String description of the MathMLGranularity.

      Specified by:
      getDisplayDescription in interface com.deltaxml.docbook.DocBookCompareDisplayable
      Returns:
      a user-friendly String description representing the MathMLGranularity object
    • toString

      public String toString()
      Overrides:
      toString in class Enum<MathMLGranularity>