public enum CombineChildren extends Enum<CombineChildren>
| Enum Constant and Description |
|---|
APPEND
Always append child elements from both recessive and dominant elements.
|
MERGE
Merge subelements from both elements.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
ATTRIBUTE_NAME |
| Modifier and Type | Method and Description |
|---|---|
static CombineChildren |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CombineChildren[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CombineChildren MERGE
This is the default.
Those subelements which can be uniquely paired between two documents using the key (tag+selected attributes)
will be merged, those that cannot be paired will be appended.
Example:
First:
<config>
<service id="1">
<parameter>parameter</parameter>
</service>
</config>
Second:
<config>
<service id="1"/>
<parameter>other value</parameter>
</service>
</config>
Result:
<config>
<service id="1"/>
<parameter>other value</parameter>
</service>
</config>
public static final CombineChildren APPEND
Example:
First:
<config>
<service id="1" combine.children="append">
<parameter>parameter</parameter>
</service>
</config>
Second:
<config>
<service id="1">
<parameter>parameter</parameter>
</service>
</config>
Result:
<config>
<service id="1" combine.children="append">
<parameter>parameter</parameter>
<parameter>parameter</parameter>
</service>
</config>
public static final String ATTRIBUTE_NAME
public static CombineChildren[] values()
for (CombineChildren c : CombineChildren.values()) System.out.println(c);
public static CombineChildren valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2021 Atteo. All rights reserved.