ExecutionContext context ) {
assert federatedNode != null;
assert context != null;
assert contributions != null;
assert contributions.size() > 0;
Contribution contribution = contributions.get(0);
assert contribution != null;
final boolean findUuid = isContributionUuidUsedForFederatedNode();
// Copy the children ...
List<Segment> children = federatedNode.getChildren();
children.clear();
Iterator<Segment> childIterator = contribution.getChildren();
while (childIterator.hasNext()) {
Segment child = childIterator.next();
children.add(child);
}
// Copy the properties ...
Map<Name, Property> properties = federatedNode.getPropertiesByName();
properties.clear();
UUID uuid = null;
UuidFactory uuidFactory = null;
Iterator<Property> propertyIterator = contribution.getProperties();
while (propertyIterator.hasNext()) {
Property property = propertyIterator.next();
if (findUuid && uuid == null && property.getName().getLocalName().equals("uuid")) {
if (property.isSingle()) {
if (uuidFactory == null) uuidFactory = context.getValueFactories().getUuidFactory();