Rename YangIRSchemaSource
[yangtools.git] / parser / yang-parser-rfc7950 / src / main / java / org / opendaylight / yangtools / yang / parser / rfc7950 / repo / TextToIRTransformer.java
index 02049b03e8dad954dea2d3f68dc2abf8b5371177..cc2238fa94febd74e88f5966a138ddf3b2a4ce31 100644 (file)
@@ -15,14 +15,14 @@ import org.opendaylight.yangtools.yang.model.api.source.YangTextSource;
 import org.opendaylight.yangtools.yang.model.repo.api.SchemaRepository;
 import org.opendaylight.yangtools.yang.model.repo.spi.SchemaSourceRegistry;
 import org.opendaylight.yangtools.yang.model.repo.spi.SchemaSourceTransformer;
-import org.opendaylight.yangtools.yang.model.spi.source.YangIRSchemaSource;
+import org.opendaylight.yangtools.yang.model.spi.source.YangIRSource;
 import org.opendaylight.yangtools.yang.parser.api.YangSyntaxErrorException;
 import org.opendaylight.yangtools.yang.parser.rfc7950.antlr.IRSupport;
 
 @Beta
-public final class TextToIRTransformer extends SchemaSourceTransformer<YangTextSource, YangIRSchemaSource> {
+public final class TextToIRTransformer extends SchemaSourceTransformer<YangTextSource, YangIRSource> {
     private TextToIRTransformer(final SchemaRepository provider, final SchemaSourceRegistry consumer) {
-        super(provider, YangTextSource.class, consumer, YangIRSchemaSource.class,
+        super(provider, YangTextSource.class, consumer, YangIRSource.class,
             input -> Futures.immediateFuture(transformText(input)));
     }
 
@@ -31,10 +31,10 @@ public final class TextToIRTransformer extends SchemaSourceTransformer<YangTextS
         return new TextToIRTransformer(provider, consumer);
     }
 
-    public static @NonNull YangIRSchemaSource transformText(final YangTextSource text)
+    public static @NonNull YangIRSource transformText(final YangTextSource text)
             throws YangSyntaxErrorException, IOException {
         final var rootStatement = IRSupport.createStatement(YangStatementStreamSource.parseYangSource(text));
         final var info = YangIRSourceInfoExtractor.forIR(rootStatement, text.sourceId());
-        return new YangIRSchemaSource(info.sourceId(), rootStatement, text.symbolicName());
+        return new YangIRSource(info.sourceId(), rootStatement, text.symbolicName());
     }
 }