Enum Class AdvancedEntityRefUsage

java.lang.Object
java.lang.Enum<AdvancedEntityRefUsage>
com.deltaxml.core.config.AdvancedEntityRefUsage
All Implemented Interfaces:
Serializable, Comparable<AdvancedEntityRefUsage>, Constable

public enum AdvancedEntityRefUsage extends Enum<AdvancedEntityRefUsage>

An advanced mode for controlling some specialist use cases, where both the entity references and their replacement text are compared. In most use cases the AUTOMATIC value should be used, to enable context dependent setting of this advanced mode.

One use case where you might want to set this variable explicitly is: when you configure the comparator for standard 'round trip' lexical preservation, but the final output format cannot represent entity references. In this case, the REPLACE value can be used. This is an alternative to specifying a custom processing mode that performs round trip processing, except for entity references which are substituted for their values (i.e. their replacement text) prior to the comparison.

Since:
7.0
  • Enum Constant Details

    • CHANGE

      public static final AdvancedEntityRefUsage CHANGE
      Keep the encoded form of the entity reference, with its change markup.
    • SPLIT

      public static final AdvancedEntityRefUsage SPLIT
      The encoded entity references have their replacement text removed and are split into 'new' and 'old' versions on detection of change. This corresponds to the documented duplication of the standard 'entityRef' and 'nestedEntityRef' modes.
    • REPLACE

      public static final AdvancedEntityRefUsage REPLACE
      Extract the replacement text from the encoded entity reference. Note that if the encoding process has been configured not to include the replacement text, then an empty string will be returned.
    • AUTOMATIC

      public static final AdvancedEntityRefUsage AUTOMATIC
      Choose one of the other three behaviours in a context dependent manner. If an encoded entity references exist then treat as SPLIT, else treat as CHANGE.
  • Method Details

    • values

      public static AdvancedEntityRefUsage[] 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 AdvancedEntityRefUsage 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
    • toString

      public String toString()
      The string representation of the enumerated type constants. Here, the strings are the lower case versions of the enumerated constants, except for 'CHANGE' whose string representation is 'skip'.
      Overrides:
      toString in class Enum<AdvancedEntityRefUsage>
      Returns:
      The string representation of the enumerated type constants.
    • getAdvancedEntityRefUsage

      public static AdvancedEntityRefUsage getAdvancedEntityRefUsage(String val)

      Returns a ExtendedBooleanProcessingMode object from the supplied String value if appropriate.

      This method should not be used under normal circumstances, enum instance values should be used instead.

      Parameters:
      val - a String representation of a EntityRefProcessingMode value or null for the default value
      Returns:
      the ExtendedBooleanProcessingMode instance corresponding to the parameter, or null if the value is invalid