+
+ private static boolean isDataNode(final Optional<DataSchemaNode> optNode) {
+ return optNode.isPresent() && isDataNode(optNode.orElseThrow());
+ }
+
+ private static boolean isDataNode(final DataSchemaNode node) {
+ return node instanceof ContainerSchemaNode || node instanceof LeafSchemaNode
+ || node instanceof LeafListSchemaNode || node instanceof ListSchemaNode
+ || node instanceof AnydataSchemaNode || node instanceof AnyxmlSchemaNode;
+ }