Deprecate StmtContext.getSchemaPath()
[yangtools.git] / yang / yang-parser-reactor / src / main / java / org / opendaylight / yangtools / yang / parser / stmt / reactor / RootStatementContext.java
index f10533b5cfb2c3ecf646608a7ea198ba386fcf83..4380b9cb55b6371d702ee2fe6580f4ca27dcf6f3 100644 (file)
@@ -106,6 +106,7 @@ public class RootStatementContext<A, D extends DeclaredStatement<A>, E extends E
     }
 
     @Override
+    @Deprecated
     public Optional<SchemaPath> getSchemaPath() {
         return Optional.of(SchemaPath.ROOT);
     }
@@ -223,7 +224,7 @@ public class RootStatementContext<A, D extends DeclaredStatement<A>, E extends E
     }
 
     boolean isEnabledSemanticVersioningImpl() {
-        return sourceContext.isEnabledSemanticVersioning();
+        return sourceContext.globalContext().isEnabledSemanticVersioning();
     }
 
     @NonNull YangVersion getRootVersionImpl() {
@@ -231,7 +232,7 @@ public class RootStatementContext<A, D extends DeclaredStatement<A>, E extends E
     }
 
     void setRootVersionImpl(final YangVersion version) {
-        checkArgument(sourceContext.getSupportedVersions().contains(version),
+        checkArgument(sourceContext.globalContext().getSupportedVersions().contains(version),
                 "Unsupported yang version %s in %s", version, getStatementSourceReference());
         checkState(this.rootVersion == null, "Version of root %s has been already set to %s", argument,
                 this.rootVersion);
@@ -239,7 +240,7 @@ public class RootStatementContext<A, D extends DeclaredStatement<A>, E extends E
     }
 
     void addMutableStmtToSealImpl(final MutableStatement mutableStatement) {
-        sourceContext.addMutableStmtToSeal(mutableStatement);
+        sourceContext.globalContext().addMutableStmtToSeal(mutableStatement);
     }
 
     void addRequiredSourceImpl(final SourceIdentifier dependency) {