+ private boolean hasWhenOrMustConstraints(final SchemaNode node) {
+ boolean hasWhenCondition;
+ boolean hasMustConstraints;
+
+ if (node instanceof ContainerSchemaNode) {
+ ContainerSchemaNode contNode = (ContainerSchemaNode)node;
+ hasWhenCondition = contNode.getConstraints().getWhenCondition() != null;
+ hasMustConstraints = !isNullOrEmpty(contNode.getConstraints().getMustConstraints());
+
+ if (hasWhenCondition || hasMustConstraints)
+ return true;
+ }
+ return false;
+ }
+