X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-netconf-connector%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fconnect%2Fnetconf%2Futil%2FInstanceIdToNodes.java;h=d0b9efc8c02fa9c5020a93a0f19241f326374fd8;hb=d8d8f731bbe6c58fcbd0e616734e2e230aaf4ab4;hp=30a7efaa568e6b5693af697f243e36a6b2ff6293;hpb=3ce8dcf0b9402aaed0af6cfda05b4ddd607d6a0d;p=controller.git diff --git a/opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/netconf/util/InstanceIdToNodes.java b/opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/netconf/util/InstanceIdToNodes.java index 30a7efaa56..d0b9efc8c0 100644 --- a/opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/netconf/util/InstanceIdToNodes.java +++ b/opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/netconf/util/InstanceIdToNodes.java @@ -51,6 +51,7 @@ import org.opendaylight.yangtools.yang.model.api.AnyXmlSchemaNode; import org.opendaylight.yangtools.yang.model.api.AugmentationSchema; import org.opendaylight.yangtools.yang.model.api.AugmentationTarget; import org.opendaylight.yangtools.yang.model.api.ChoiceCaseNode; +import org.opendaylight.yangtools.yang.model.api.ChoiceSchemaNode; import org.opendaylight.yangtools.yang.model.api.ContainerSchemaNode; import org.opendaylight.yangtools.yang.model.api.DataNodeContainer; import org.opendaylight.yangtools.yang.model.api.DataSchemaNode; @@ -404,7 +405,7 @@ public abstract class InstanceIdToNodes implements Ident private final ImmutableMap> byArg; - protected ChoiceNodeNormalization(final org.opendaylight.yangtools.yang.model.api.ChoiceNode schema) { + protected ChoiceNodeNormalization(final ChoiceSchemaNode schema) { super(new NodeIdentifier(schema.getQName())); final ImmutableMap.Builder> byArgBuilder = ImmutableMap.builder(); @@ -460,8 +461,7 @@ public abstract class InstanceIdToNodes implements Ident private static Optional findChildSchemaNode(final DataNodeContainer parent, final QName child) { DataSchemaNode potential = parent.getDataChildByName(child); if (potential == null) { - final Iterable choices = FluentIterable.from( - parent.getChildNodes()).filter(org.opendaylight.yangtools.yang.model.api.ChoiceNode.class); + final Iterable choices = FluentIterable.from(parent.getChildNodes()).filter(ChoiceSchemaNode.class); potential = findChoice(choices, child); } return Optional.fromNullable(potential); @@ -481,11 +481,10 @@ public abstract class InstanceIdToNodes implements Ident return fromDataSchemaNode(result); } - private static org.opendaylight.yangtools.yang.model.api.ChoiceNode findChoice( - final Iterable choices, final QName child) { - org.opendaylight.yangtools.yang.model.api.ChoiceNode foundChoice = null; + private static ChoiceSchemaNode findChoice(final Iterable choices, final QName child) { + org.opendaylight.yangtools.yang.model.api.ChoiceSchemaNode foundChoice = null; choiceLoop: - for (final org.opendaylight.yangtools.yang.model.api.ChoiceNode choice : choices) { + for (final ChoiceSchemaNode choice : choices) { for (final ChoiceCaseNode caze : choice.getCases()) { if (findChildSchemaNode(caze, child).isPresent()) { foundChoice = choice; @@ -545,8 +544,8 @@ public abstract class InstanceIdToNodes implements Ident return fromListSchemaNode((ListSchemaNode) potential); } else if (potential instanceof LeafSchemaNode) { return new LeafNormalization((LeafSchemaNode) potential); - } else if (potential instanceof org.opendaylight.yangtools.yang.model.api.ChoiceNode) { - return new ChoiceNodeNormalization((org.opendaylight.yangtools.yang.model.api.ChoiceNode) potential); + } else if (potential instanceof ChoiceSchemaNode) { + return new ChoiceNodeNormalization((ChoiceSchemaNode) potential); } else if (potential instanceof LeafListSchemaNode) { return fromLeafListSchemaNode((LeafListSchemaNode) potential); } else if (potential instanceof AnyXmlSchemaNode) {