+ /**
+ * Returns an AugmentationSchemaNode as effective in a parent node.
+ *
+ * @param schema Augmentation schema
+ * @param parent Parent schema
+ * @return Adjusted Augmentation schema
+ * @throws NullPointerException if any of the arguments is null
+ */
+ public static AugmentationSchemaNode create(final AugmentationSchemaNode schema, final DataNodeContainer parent) {
+ Set<DataSchemaNode> children = new HashSet<>();
+ for (DataSchemaNode augNode : schema.getChildNodes()) {
+ children.add(parent.getDataChildByName(augNode.getQName()));
+ }
+ return new EffectiveAugmentationSchema(schema, children);
+ }
+