} else if (node instanceof ChoiceNode) {
validateChoiceNodeData((ChoiceNode) node, referencedByCtx, referencingCtx, modificationType, current);
} else if (node instanceof DataContainerNode) {
- validateDataContainerNodeData((DataContainerNode<?>) node, referencedByCtx, referencingCtx,
- modificationType, current);
+ validateDataContainerNodeData((DataContainerNode) node, referencedByCtx, referencingCtx, modificationType,
+ current);
} else if (node instanceof MapNode) {
validateMapNodeData((MapNode) node, referencedByCtx, referencingCtx, modificationType, current);
}
final LeafRefContext referencingCtx, final ModificationType modificationType,
final YangInstanceIdentifier current) {
for (final DataContainerChild child : node.body()) {
- final QName qname = child.getNodeType();
+ final QName qname = child.getIdentifier().getNodeType();
final LeafRefContext childReferencedByCtx = referencedByCtx == null ? null
: findReferencedByCtxUnderChoice(referencedByCtx, qname);
final LeafRefContext childReferencingCtx = referencingCtx == null ? null
}
}
- private void validateDataContainerNodeData(final DataContainerNode<?> node, final LeafRefContext referencedByCtx,
+ private void validateDataContainerNodeData(final DataContainerNode node, final LeafRefContext referencedByCtx,
final LeafRefContext referencingCtx, final ModificationType modificationType,
final YangInstanceIdentifier current) {
for (final DataContainerChild child : node.body()) {
private void validateChildNodeData(final DataContainerChild child, final LeafRefContext referencedByCtx,
final LeafRefContext referencingCtx, final ModificationType modificationType,
final YangInstanceIdentifier current) {
- final QName qname = child.getNodeType();
+ final QName qname = child.getIdentifier().getNodeType();
final LeafRefContext childReferencedByCtx = referencedByCtx == null ? null
: referencedByCtx.getReferencedChildByName(qname);
final LeafRefContext childReferencingCtx = referencingCtx == null ? null
LOG.debug("Invalid leafref value [{}] allowed values {} by validation of leafref TARGET node: {} path "
+ "of invalid LEAFREF node: {} leafRef target path: {} {}", leafRefsValue,
- leafRefTargetNodeValues, leaf.getNodeType(), leafRefContext.getCurrentNodePath(),
+ leafRefTargetNodeValues, leaf.getIdentifier(), leafRefContext.getCurrentNodePath(),
leafRefContext.getAbsoluteLeafRefTargetPath(), FAILED);
errorsMessages.add(String.format("Invalid leafref value [%s] allowed values %s by validation of leafref"
+ " TARGET node: %s path of invalid LEAFREF node: %s leafRef target path: %s %s", leafRefsValue,
- leafRefTargetNodeValues, leaf.getNodeType(), leafRefContext.getCurrentNodePath(),
+ leafRefTargetNodeValues, leaf.getIdentifier(), leafRefContext.getCurrentNodePath(),
leafRefContext.getAbsoluteLeafRefTargetPath(),
FAILED));
});
LOG.debug("Operation [{}] validate data of LEAFREF node: name[{}] = value[{}] {}", modificationType,
referencingCtx.getNodeName(), leaf.body(), FAILED);
LOG.debug("Invalid leafref value [{}] allowed values {} of LEAFREF node: {} leafRef target path: {}",
- leaf.body(), values, leaf.getNodeType(), referencingCtx.getAbsoluteLeafRefTargetPath());
+ leaf.body(), values, leaf.getIdentifier(), referencingCtx.getAbsoluteLeafRefTargetPath());
errorsMessages.add(String.format("Invalid leafref value [%s] allowed values %s of LEAFREF node: %s leafRef "
- + "target path: %s", leaf.body(), values, leaf.getNodeType(),
+ + "target path: %s", leaf.body(), values, leaf.getIdentifier(),
referencingCtx.getAbsoluteLeafRefTargetPath()));
}
final PathArgument pathArgument = new NodeIdentifier(next.getQName());
if (node instanceof DataContainerNode) {
- processChildNode(values, (DataContainerNode<?>) node, pathArgument, next.getQNamePredicates(), path,
- current);
+ processChildNode(values, (DataContainerNode) node, pathArgument, next.getQNamePredicates(), path, current);
} else if (node instanceof MapNode) {
Stream<MapEntryNode> entries = ((MapNode) node).body().stream();
if (!nodePredicates.isEmpty() && current != null) {
}
}
- private void processChildNode(final Set<Object> values, final DataContainerNode<?> parent,
+ private void processChildNode(final Set<Object> values, final DataContainerNode parent,
final PathArgument arg, final List<QNamePredicate> nodePredicates, final Deque<QNameWithPredicate> path,
final YangInstanceIdentifier current) {
final DataContainerChild child = parent.childByArg(arg);