Enum ChangeType

java.lang.Object
java.lang.Enum<ChangeType>
eu.maveniverse.domtrip.ChangeType
All Implemented Interfaces:
Serializable, Comparable<ChangeType>, java.lang.constant.Constable

public enum ChangeType extends Enum<ChangeType>
Enumerates the types of changes that can be detected between two XML documents.

Change types are classified as either semantic (affecting the meaning of the XML) or formatting-only (affecting only the presentation). This classification enables filtering to focus on meaningful changes while ignoring formatting noise.

Since:
1.3.0
See Also:
  • Enum Constant Details

    • ELEMENT_ADDED

      public static final ChangeType ELEMENT_ADDED
      A new element was inserted.
    • ELEMENT_REMOVED

      public static final ChangeType ELEMENT_REMOVED
      An element was deleted.
    • ELEMENT_MOVED

      public static final ChangeType ELEMENT_MOVED
      An element was reordered among its siblings (same content, different position).
    • TEXT_CHANGED

      public static final ChangeType TEXT_CHANGED
      Text content of an element was modified.
    • ATTRIBUTE_ADDED

      public static final ChangeType ATTRIBUTE_ADDED
      A new attribute was added to an existing element.
    • ATTRIBUTE_REMOVED

      public static final ChangeType ATTRIBUTE_REMOVED
      An attribute was removed from an element.
    • ATTRIBUTE_CHANGED

      public static final ChangeType ATTRIBUTE_CHANGED
      An attribute value was modified.
    • ATTRIBUTE_MOVED

      public static final ChangeType ATTRIBUTE_MOVED
      An attribute was moved.
    • COMMENT_ADDED

      public static final ChangeType COMMENT_ADDED
      A comment was inserted.
    • COMMENT_REMOVED

      public static final ChangeType COMMENT_REMOVED
      A comment was deleted.
    • COMMENT_CHANGED

      public static final ChangeType COMMENT_CHANGED
      Comment content was modified.
    • PI_ADDED

      public static final ChangeType PI_ADDED
      A processing instruction was inserted.
    • PI_REMOVED

      public static final ChangeType PI_REMOVED
      A processing instruction was deleted.
    • PI_CHANGED

      public static final ChangeType PI_CHANGED
      A processing instruction was modified.
    • NAMESPACE_CHANGED

      public static final ChangeType NAMESPACE_CHANGED
      A namespace declaration was modified.
    • WHITESPACE_CHANGED

      public static final ChangeType WHITESPACE_CHANGED
      Indentation or spacing changed (formatting only, no semantic effect).
    • QUOTE_STYLE_CHANGED

      public static final ChangeType QUOTE_STYLE_CHANGED
      Attribute quote style changed between single and double (formatting only).
    • ENTITY_FORM_CHANGED

      public static final ChangeType ENTITY_FORM_CHANGED
      Entity encoding form changed, e.g. &lt; vs &#60; (formatting only).
    • EMPTY_ELEMENT_STYLE_CHANGED

      public static final ChangeType EMPTY_ELEMENT_STYLE_CHANGED
      Empty element style changed between self-closing and expanded (formatting only).
  • Method Details

    • values

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

      public static ChangeType valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null
    • isSemantic

      public boolean isSemantic()
      Returns whether this change type represents a semantic change that affects the meaning of the XML document.
      Returns:
      true if the change is semantic, false if formatting-only
    • isFormattingOnly

      public boolean isFormattingOnly()
      Returns whether this change type represents a formatting-only change that does not affect the semantic meaning of the XML document.
      Returns:
      true if the change is formatting-only, false if semantic