for (JAXBElement<?> ref : def.getReferencedConfiguration()
.getMapPropertyRefOrListPropertyRefOrSimplePropertyRef()) {
String tagName = ref.getName().getLocalPart();
if ("simple-property-ref".equals(tagName)) {
BundleConfigPropertyReference r = (BundleConfigPropertyReference) ref.getValue();
if ("pluginConfiguration".equals(r.getContext())) {
bld.addPluginConfigurationSimplePropertyReference(r.getName(),
r.getTargetName());
} else if ("resourceConfiguration".equals(r.getContext())) {
bld.addResourceConfigurationSimplePropertyReference(r.getName(),
r.getTargetName());
}
} else if ("list-property-ref".equals(tagName)) {
BundleConfigPropertyReference r = (BundleConfigPropertyReference) ref.getValue();
if ("pluginConfiguration".equals(r.getContext())) {
bld.addPluginConfigurationListPropertyReference(r.getName(),
r.getTargetName());
} else if ("resourceConfiguration".equals(r.getContext())) {
bld.addResourceConfigurationListPropertyReference(r.getName(),
r.getTargetName());
}
} else if ("map-property-ref".equals(tagName)) {
BundleConfigPropertyReference r = (BundleConfigPropertyReference) ref.getValue();
if ("pluginConfiguration".equals(r.getContext())) {
bld.addPluginConfigurationMapPropertyReference(r.getName(),
r.getTargetName());
} else if ("resourceConfiguration".equals(r.getContext())) {
bld.addResourceConfigurationMapPropertyReference(r.getName(),
r.getTargetName());
}
} else if ("trait-ref".equals(tagName)) {
BundleTraitReference r = (BundleTraitReference) ref.getValue();
bld.addMeasurementTraitReference(r.getName(), r.getTargetName());
} else if ("all".equals(tagName)) {
BundleConfigFullCopy r = (BundleConfigFullCopy) ref.getValue();
if ("pluginConfiguration".equals(r.getOf())) {
bld.addFullPluginConfigurationReference(r.getPrefix());
} else if ("resourceConfiguration".equals(r.getOf())) {
bld.addFullResourceConfigurationReference(r.getPrefix());
} else if ("traits".equals(r.getOf())) {
bld.addFullMeasurementTraitsReference(r.getPrefix());
}
}
}
bld.build();