- /**
- * Tries to find in {@code parent} which is dealed as augmentation target node with QName as {@code child}. If such
- * node is found then it is returned, else null.
- */
- AugmentationSchema findCorrespondingAugment(final DataSchemaNode parent, final DataSchemaNode child) {
- if (parent instanceof AugmentationTarget) {
- for (AugmentationSchema augmentation : ((AugmentationTarget) parent).getAvailableAugmentations()) {
- DataSchemaNode childInAugmentation = augmentation.getDataChildByName(child.getQName());
- if (childInAugmentation != null) {
- return augmentation;
- }
- }
- }
- return null;
- }
-