Enum Class PresetPreservationMode
- All Implemented Interfaces:
Serializable,Comparable<PresetPreservationMode>,Constable
- Since:
- 7.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionMake a note of which attributes have been expanded to their default values, during parsing.The base level of preservation, which has almost everything disabled.Preserve the XML document and attribute information.Preserve the XML document information.Preserve round trip information and data that can be used to identify differences in an entity's value.Preserve round trip information and data that can be used to identify differences in both an entity's and nested entity's value.The minimum amount of information required for round trip processing.Preserve the normal amount of information (as expected by normal XML processing). -
Method Summary
Modifier and TypeMethodDescriptionstatic PresetPreservationModeReturns a ProcessingItem object from the supplied String value if appropriate.toString()The string representation of the enumerated value.static PresetPreservationModeReturns the enum constant of this class with the specified name.static PresetPreservationMode[]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
-
BASE
The base level of preservation, which has almost everything disabled. The only preservation item to be enabled is the
PI_ENTITY_REPLACEMENT_TEXT. Its string representation is 'base' (without the quotes).Note that if neither entity references nor their replacement texts are preserved, then entity references will be removed from the output altogether. This is why we have introduced a base class, which can be used in preference to setting all preserve items to disabled. It is this pre-defined set that most of the preservation item specific samples extend.
-
NESTED_ENTITY_REF
Preserve round trip information and data that can be used to identify differences in both an entity's and nested entity's value. This mode addsINNER_ENTITY_APPpreservation item to thePI_ENTITY_REFpreservation set. Note this mode, currently, preserves as much information as possible. Its string representation is 'nestedEntityRef' (without the quotes). -
ENTITY_REF
Preserve round trip information and data that can be used to identify differences in an entity's value. This mode addsENTITY_REPLACEMENT_TEXTpreservation item to thePI_ROUND_TRIPpreservation set. To identify differences in the way the entities are defined, then the nested entity application information is also required. Its string representation is 'entityRef' (without the quotes). -
ROUND_TRIP
The minimum amount of information required for round trip processing. That is the internal subset, XML declaration, entity reference, original attribute, and CDATA element preservation. This is the default setting. Its string representation is 'roundTrip' (without the quotes). -
DOC_AND_ATTRIB
Preserve the XML document and attribute information. This extends theDOCUMENToption with mark-up for recording which attributes of an element have been expanded. Note, that the expanded default attributes can be removed by theDefaultAttributeRemovalFilterfilter. Its string representation is 'docAndAttrib' (without the quotes). -
DOCUMENT
Preserve the XML document information. This adds internal subset and XML declaration preservation to that of the normal preservation data. Its string representation is 'document' (without the quotes). -
ATTRIBUTE
Make a note of which attributes have been expanded to their default values, during parsing. This extends theXML_PARSERoption with mark-up for recording which attributes of an element have been expanded. Note, that the expanded default attributes can be removed by theDefaultAttributeRemovalFilterfilter. Its string representation is 'attribute' (without the quotes). -
XML_PARSER
Preserve the normal amount of information (as expected by normal XML processing). This is equivalent to preserving only the entity application bodies, comments and processing instructions. Its string representation is 'xmlParser' (without the quotes).
-
-
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
-
getPresetPreservationMode
Returns a ProcessingItem 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 ProcessingItem value or null for the default value- Returns:
- the ProcessingItem instance corresponding to the parameter, or null if the value is invalid
-
toString
The string representation of the enumerated value.- Overrides:
toStringin classEnum<PresetPreservationMode>- Returns:
- the string representation of the enumerated value.
-