Package eu.maveniverse.domtrip
Enum ChangeType
- java.lang.Object
-
- java.lang.Enum<ChangeType>
-
- eu.maveniverse.domtrip.ChangeType
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<ChangeType>
public enum ChangeType extends java.lang.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.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ATTRIBUTE_ADDEDA new attribute was added to an existing element.ATTRIBUTE_CHANGEDAn attribute value was modified.ATTRIBUTE_MOVEDAn attribute was moved.ATTRIBUTE_REMOVEDAn attribute was removed from an element.COMMENT_ADDEDA comment was inserted.COMMENT_CHANGEDComment content was modified.COMMENT_REMOVEDA comment was deleted.ELEMENT_ADDEDA new element was inserted.ELEMENT_MOVEDAn element was reordered among its siblings (same content, different position).ELEMENT_REMOVEDAn element was deleted.EMPTY_ELEMENT_STYLE_CHANGEDEmpty element style changed between self-closing and expanded (formatting only).ENTITY_FORM_CHANGEDEntity encoding form changed, e.g.NAMESPACE_CHANGEDA namespace declaration was modified.PI_ADDEDA processing instruction was inserted.PI_CHANGEDA processing instruction was modified.PI_REMOVEDA processing instruction was deleted.QUOTE_STYLE_CHANGEDAttribute quote style changed between single and double (formatting only).TEXT_CHANGEDText content of an element was modified.WHITESPACE_CHANGEDIndentation or spacing changed (formatting only, no semantic effect).
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisFormattingOnly()Returns whether this change type represents a formatting-only change that does not affect the semantic meaning of the XML document.booleanisSemantic()Returns whether this change type represents a semantic change that affects the meaning of the XML document.static ChangeTypevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static ChangeType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
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.<vs<(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 Detail
-
values
public static ChangeType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ChangeType c : ChangeType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ChangeType valueOf(java.lang.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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.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:
trueif the change is semantic,falseif 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:
trueif the change is formatting-only,falseif semantic
-
-