Enum ChangeType
- All Implemented Interfaces:
Serializable, Comparable<ChangeType>, java.lang.constant.Constable
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:
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA new attribute was added to an existing element.An attribute value was modified.An attribute was moved.An attribute was removed from an element.A comment was inserted.Comment content was modified.A comment was deleted.A new element was inserted.An element was reordered among its siblings (same content, different position).An element was deleted.Empty element style changed between self-closing and expanded (formatting only).Entity encoding form changed, e.g.A namespace declaration was modified.A processing instruction was inserted.A processing instruction was modified.A processing instruction was deleted.Attribute quote style changed between single and double (formatting only).Text content of an element was modified.Indentation or spacing changed (formatting only, no semantic effect). -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether this change type represents a formatting-only change that does not affect the semantic meaning of the XML document.booleanReturns whether this change type represents a semantic change that affects the meaning of the XML document.static ChangeTypeReturns 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 Details
-
ELEMENT_ADDED
A new element was inserted. -
ELEMENT_REMOVED
An element was deleted. -
ELEMENT_MOVED
An element was reordered among its siblings (same content, different position). -
TEXT_CHANGED
Text content of an element was modified. -
ATTRIBUTE_ADDED
A new attribute was added to an existing element. -
ATTRIBUTE_REMOVED
An attribute was removed from an element. -
ATTRIBUTE_CHANGED
An attribute value was modified. -
ATTRIBUTE_MOVED
An attribute was moved. -
COMMENT_ADDED
A comment was inserted. -
COMMENT_REMOVED
A comment was deleted. -
COMMENT_CHANGED
Comment content was modified. -
PI_ADDED
A processing instruction was inserted. -
PI_REMOVED
A processing instruction was deleted. -
PI_CHANGED
A processing instruction was modified. -
NAMESPACE_CHANGED
A namespace declaration was modified. -
WHITESPACE_CHANGED
Indentation or spacing changed (formatting only, no semantic effect). -
QUOTE_STYLE_CHANGED
Attribute quote style changed between single and double (formatting only). -
ENTITY_FORM_CHANGED
Entity encoding form changed, e.g.<vs<(formatting only). -
EMPTY_ELEMENT_STYLE_CHANGED
Empty element style changed between self-closing and expanded (formatting only).
-
-
Method Details
-
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
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 nameNullPointerException- 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
-