import java.util.List;
import java.util.Set;
import org.opendaylight.yangtools.yang.model.api.Module;
-import org.opendaylight.yangtools.yang.model.api.SchemaContext;
import org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement;
import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
import org.opendaylight.yangtools.yang.model.api.stmt.ModuleStatement;
return new EffectiveSchemaContext(modules, rootDeclaredStatements, rootEffectiveStatements);
}
- /**
- * Resolve SchemaContext for a set of modules.
- *
- * @deprecated Use {@link SimpleSchemaContext#forModules(Set)} instead.
- */
- @Deprecated
- public static SchemaContext resolveSchemaContext(final Set<Module> modules) {
- return SimpleSchemaContext.forModules(modules);
- }
-
@VisibleForTesting
public List<DeclaredStatement<?>> getRootDeclaredStatements() {
return rootDeclaredStatements;
import org.opendaylight.yangtools.yang.model.api.UnknownSchemaNode;
import org.opendaylight.yangtools.yang.model.parser.api.YangSyntaxErrorException;
import org.opendaylight.yangtools.yang.model.repo.api.YangTextSchemaSource;
+import org.opendaylight.yangtools.yang.model.util.SimpleSchemaContext;
import org.opendaylight.yangtools.yang.parser.rfc6020.repo.YangStatementStreamSource;
import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException;
import org.opendaylight.yangtools.yang.parser.stmt.reactor.CrossSourceStatementReactor;
assertEquals(3,((EffectiveSchemaContext) schemaContext).getRootEffectiveStatements().size());
final Set<Module> modules = schemaContext.getModules();
- final SchemaContext copiedSchemaContext = EffectiveSchemaContext.resolveSchemaContext(modules);
+ final SchemaContext copiedSchemaContext = SimpleSchemaContext.forModules(modules);
assertNotNull(copiedSchemaContext);
assertEquals(modules, copiedSchemaContext.getModules());
}