Enum Class AdvancedEntityRefUsage
- All Implemented Interfaces:
Serializable,Comparable<AdvancedEntityRefUsage>,Constable
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
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionChoose one of the other three behaviours in a context dependent manner.Keep the encoded form of the entity reference, with its change markup.Extract the replacement text from the encoded entity reference.The encoded entity references have their replacement text removed and are split into 'new' and 'old' versions on detection of change. -
Method Summary
Modifier and TypeMethodDescriptionstatic AdvancedEntityRefUsageReturns a ExtendedBooleanProcessingMode object from the supplied String value if appropriate.toString()The string representation of the enumerated type constants.static AdvancedEntityRefUsageReturns the enum constant of this class with the specified name.static AdvancedEntityRefUsage[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, valueOf
-
Enum Constant Details
-
CHANGE
Keep the encoded form of the entity reference, with its change markup. -
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
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
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
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
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 nameNullPointerException- if the argument is null
-
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:
toStringin classEnum<AdvancedEntityRefUsage>- Returns:
- The string representation of the enumerated type constants.
-
getAdvancedEntityRefUsage
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
-