- public static boolean needToCopyByAugment(StmtContext<?, ?, ?> stmtContext) {
-
- Set<StatementDefinition> noCopyDefSet = new HashSet<>();
- noCopyDefSet.add(Rfc6020Mapping.USES);
-
- StatementDefinition def = stmtContext.getPublicDefinition();
- return !noCopyDefSet.contains(def);
- }
-
- public static boolean isReusedByAugment(StmtContext<?, ?, ?> stmtContext) {
-
- Set<StatementDefinition> reusedDefSet = new HashSet<>();
- reusedDefSet.add(Rfc6020Mapping.TYPEDEF);
-
- StatementDefinition def = stmtContext.getPublicDefinition();
-
- return reusedDefSet.contains(def);
- }
-
- public static StatementContextBase<?, ?, ?> getAugmentTargetCtx(
- final Mutable<SchemaNodeIdentifier, AugmentStatement, EffectiveStatement<SchemaNodeIdentifier, AugmentStatement>> augmentNode) {
-
- final SchemaNodeIdentifier augmentTargetNode = augmentNode
- .getStatementArgument();
- if (augmentTargetNode == null) {
- throw new IllegalArgumentException(
- "Augment argument null, something bad happened in some of previous parsing phases");
+ private static boolean reguiredCheckOfMandatoryNodes(StatementContextBase<?, ?, ?> sourceCtx,
+ StatementContextBase<?, ?, ?> targetCtx) {
+ /*
+ * If the statement argument is not QName, it cannot be mandatory statement,
+ * therefore return false and skip mandatory nodes validation
+ */
+ if(!(sourceCtx.getStatementArgument() instanceof QName)) {
+ return false;