Enum Class PreservationProcessingMode

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

public enum PreservationProcessingMode extends Enum<PreservationProcessingMode>

Represents the behaviour required when outputting preserved lexical items which have changed.

If Lexical Preservation is used to keep hold of items such as Doctype declarations, comments, processing instructions etc, you must choose whether or not to convert these items back from the XML encoded form into their original form in the result. If you wish to convert them back to their original form (i.e. not encoded in XML elements), you must decide which version of any changed items you are going to use. This enumeration stored the possible values to use when making these decisions.

Since:
7.0
  • Enum Constant Details

  • Method Details

    • values

      public static PreservationProcessingMode[] 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 PreservationProcessingMode 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 same as the enumerated types except for 'AUTOMATIC' and 'CHANGE' whose string representations are 'auto' and 'skip' respectively.
      Overrides:
      toString in class Enum<PreservationProcessingMode>
      Returns:
      The string representation of the enumerated type constants.
    • getProcessingMode

      public static PreservationProcessingMode getProcessingMode(String val)

      Returns a ProcessingMode 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 ProcessingMode value or null for the default value
      Returns:
      the ProcessingMode instance corresponding to the parameter, or null if the value is invalid