metadataBuilders = new HashMap<QName, MetadataBuilder>();
Iterator<Map.Entry<String, JsonNode>> it = metadata.getFields();
while (it.hasNext()) {
Map.Entry<String, JsonNode> entry = it.next();
QName qname = QNameConverter.fromJson(entry.getKey(), namespaces);
MetadataBuilder builder = readMetadata(entry.getValue(), qname);
metadataBuilders.put(qname, builder);
}
}
ObjectNode metadataToDelete = getObject(node, "metadataToDelete", null);
if (metadataToDelete != null) {
if (metadataBuilders == null) {
metadataBuilders = new HashMap<QName, MetadataBuilder>();
}
Iterator<Map.Entry<String, JsonNode>> it = metadataToDelete.getFields();
while (it.hasNext()) {
Map.Entry<String, JsonNode> entry = it.next();
QName qname = QNameConverter.fromJson(entry.getKey(), namespaces);
MetadataBuilder builder = readMetadataToDelete(entry.getValue(), metadataBuilders.get(qname), qname);
metadataBuilders.put(qname, builder);
}
}
if (metadataBuilders != null) {