import org.opendaylight.yangtools.yang.model.api.ContainerSchemaNode;
import org.opendaylight.yangtools.yang.model.api.DataNodeContainer;
import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
+import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
import org.opendaylight.yangtools.yang.model.api.ListSchemaNode;
import org.opendaylight.yangtools.yang.model.api.RpcDefinition;
-import org.opendaylight.yangtools.yang.model.api.SchemaContext;
import org.opendaylight.yangtools.yang.model.api.SchemaNode;
import org.opendaylight.yangtools.yang.test.util.YangParserTestUtils;
import org.slf4j.Logger;
}
@SuppressWarnings("checkstyle:IllegalCatch")
- public static SchemaContext loadSchemaContext(final String yangPath, final SchemaContext schemaContext) {
+ public static EffectiveModelContext loadSchemaContext(final String yangPath,
+ final EffectiveModelContext schemaContext) {
try {
Preconditions.checkArgument(yangPath != null, "Path can not be null.");
Preconditions.checkArgument(!yangPath.isEmpty(), "Path can not be empty.");
@SuppressWarnings("checkstyle:IllegalCatch")
public static NormalizedNodeContext loadNormalizedContextFromXmlFile(final String pathToInputFile,
- final String uri, final SchemaContext schemaContext) {
+ final String uri, final EffectiveModelContext schemaContext) {
final InstanceIdentifierContext<?> iiContext =
ParserIdentifier.toInstanceIdentifier(uri, schemaContext, Optional.empty());
final InputStream inputStream = TestRestconfUtils.class.getResourceAsStream(pathToInputFile);
final String schemaNodeName = iiContext.getSchemaNode().getQName().getLocalName();
if (!schemaNodeName.equalsIgnoreCase(docRootElm)) {
- final Collection<DataSchemaNode> children = ((DataNodeContainer) schemaNode).getChildNodes();
- for (final DataSchemaNode child : children) {
+ for (final DataSchemaNode child : ((DataNodeContainer) schemaNode).getChildNodes()) {
if (child.getQName().getLocalName().equalsIgnoreCase(docRootElm)) {
schemaNode = child;
break;