public enum PresetPreservationMode extends java.lang.Enum<PresetPreservationMode>
Enum Constant and Description |
---|
ATTRIBUTE
Make a note of which attributes have been expanded to their default values, during parsing.
|
BASE
The base level of preservation, which has almost everything disabled.
|
DOC_AND_ATTRIB
Preserve the XML document and attribute information.
|
DOCUMENT
Preserve the XML document information.
|
ENTITY_REF
Preserve round trip information and data that can be used to identify differences in an entity's value.
|
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.
|
ROUND_TRIP
The minimum amount of information required for round trip processing.
|
XML_PARSER
Preserve the normal amount of information (as expected by normal XML processing).
|
Modifier and Type | Method and Description |
---|---|
static PresetPreservationMode |
getPresetPreservationMode(java.lang.String val)
Returns a ProcessingItem object from the supplied String value if appropriate.
|
java.lang.String |
toString()
The string representation of the enumerated value.
|
static PresetPreservationMode |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static PresetPreservationMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PresetPreservationMode 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.
public static final PresetPreservationMode NESTED_ENTITY_REF
INNER_ENTITY_APP
preservation item to the PI_ENTITY_REF
preservation set.
Note this mode, currently, preserves as much information as possible. Its string representation is 'nestedEntityRef' (without
the quotes).public static final PresetPreservationMode ENTITY_REF
ENTITY_REPLACEMENT_TEXT
preservation item to the PI_ROUND_TRIP
preservation 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).public static final PresetPreservationMode ROUND_TRIP
public static final PresetPreservationMode DOC_AND_ATTRIB
DOCUMENT
option with mark-up for recording
which attributes of an element have been expanded. Note, that the expanded default attributes can be removed by the
DefaultAttributeRemovalFilter
filter. Its string representation is 'docAndAttrib' (without the quotes).public static final PresetPreservationMode DOCUMENT
public static final PresetPreservationMode ATTRIBUTE
XML_PARSER
option with mark-up for recording which attributes of an element have been expanded. Note, that the
expanded default attributes can be removed by the DefaultAttributeRemovalFilter
filter. Its string
representation is 'attribute' (without the quotes).public static final PresetPreservationMode XML_PARSER
public static PresetPreservationMode[] values()
for (PresetPreservationMode c : PresetPreservationMode.values()) System.out.println(c);
public static PresetPreservationMode valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static PresetPreservationMode getPresetPreservationMode(java.lang.String val)
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.
val
- a String representation of a ProcessingItem value or null for the default valuepublic java.lang.String toString()
toString
in class java.lang.Enum<PresetPreservationMode>