import java.net.URISyntaxException;
import java.util.ArrayDeque;
import java.util.ArrayList;
-import java.util.Collection;
import java.util.Deque;
import java.util.List;
import java.util.Optional;
import org.opendaylight.yangtools.yang.data.codec.xml.XmlParserStream;
import org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNormalizedNodeStreamWriter;
import org.opendaylight.yangtools.yang.data.impl.schema.NormalizedNodeResult;
-import org.opendaylight.yangtools.yang.data.impl.schema.SchemaUtils;
+import org.opendaylight.yangtools.yang.data.util.DataSchemaContextNode;
import org.opendaylight.yangtools.yang.model.api.AugmentationSchemaNode;
import org.opendaylight.yangtools.yang.model.api.AugmentationTarget;
import org.opendaylight.yangtools.yang.model.api.CaseSchemaNode;
private static final Logger LOG = LoggerFactory.getLogger(XmlNormalizedNodeBodyReader.class);
- public XmlNormalizedNodeBodyReader(ControllerContext controllerContext) {
+ public XmlNormalizedNodeBodyReader(final ControllerContext controllerContext) {
super(controllerContext);
}
final Object child = foundSchemaNodes.pop();
if (child instanceof AugmentationSchemaNode) {
final AugmentationSchemaNode augmentSchemaNode = (AugmentationSchemaNode) child;
- iiToDataList.add(SchemaUtils.getNodeIdentifierForAugmentation(augmentSchemaNode));
+ iiToDataList.add(DataSchemaContextNode.augmentationIdentifierFrom(augmentSchemaNode));
} else if (child instanceof DataSchemaNode) {
schemaNode = (DataSchemaNode) child;
iiToDataList.add(new YangInstanceIdentifier.NodeIdentifier(schemaNode.getQName()));
final String namespace) {
final Deque<Object> result = new ArrayDeque<>();
final ArrayList<ChoiceSchemaNode> choiceSchemaNodes = new ArrayList<>();
- final Collection<DataSchemaNode> children = ((DataNodeContainer) schemaNode).getChildNodes();
- for (final DataSchemaNode child : children) {
+ for (final DataSchemaNode child : ((DataNodeContainer) schemaNode).getChildNodes()) {
if (child instanceof ChoiceSchemaNode) {
choiceSchemaNodes.add((ChoiceSchemaNode) child);
} else if (child.getQName().getLocalName().equalsIgnoreCase(elementName)
}
for (final ChoiceSchemaNode choiceNode : choiceSchemaNodes) {
- for (final CaseSchemaNode caseNode : choiceNode.getCases().values()) {
+ for (final CaseSchemaNode caseNode : choiceNode.getCases()) {
final Deque<Object> resultFromRecursion = findPathToSchemaNodeByName(caseNode, elementName, namespace);
if (!resultFromRecursion.isEmpty()) {
resultFromRecursion.push(choiceNode);