Promote SchemaSourceRepresentation
[yangtools.git] / parser / yang-parser-rfc7950 / src / main / java / org / opendaylight / yangtools / yang / parser / rfc7950 / repo / YinStatementStreamSource.java
index cdbdb827042a21b1d4988896bc44f76bb8edbe3a..23f45572c5a5f7951d32d1e581e61f8d4c407915 100644 (file)
@@ -22,9 +22,9 @@ import org.opendaylight.yangtools.yang.common.XMLNamespace;
 import org.opendaylight.yangtools.yang.common.YangVersion;
 import org.opendaylight.yangtools.yang.model.api.meta.StatementDefinition;
 import org.opendaylight.yangtools.yang.model.api.meta.StatementSourceReference;
-import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier;
-import org.opendaylight.yangtools.yang.model.repo.api.YinDomSchemaSource;
-import org.opendaylight.yangtools.yang.model.repo.api.YinXmlSchemaSource;
+import org.opendaylight.yangtools.yang.model.api.source.SourceIdentifier;
+import org.opendaylight.yangtools.yang.model.spi.source.YinDomSource;
+import org.opendaylight.yangtools.yang.model.spi.source.YinXmlSource;
 import org.opendaylight.yangtools.yang.parser.spi.meta.ModelProcessingPhase;
 import org.opendaylight.yangtools.yang.parser.spi.source.PrefixResolver;
 import org.opendaylight.yangtools.yang.parser.spi.source.QNameToStatementDefinition;
@@ -40,8 +40,8 @@ import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 
 /**
- * A {@link StatementStreamSource} based on a {@link YinXmlSchemaSource}. Internal implementation works on top
- * of {@link YinDomSchemaSource} and its DOM document.
+ * A {@link StatementStreamSource} based on a {@link YinXmlSource}. Internal implementation works on top
+ * of {@link YinDomSource} and its DOM document.
  *
  * @author Robert Varga
  */
@@ -58,17 +58,17 @@ public final class YinStatementStreamSource extends AbstractSimpleIdentifiable<S
         });
     private final Node root;
 
-    private YinStatementStreamSource(final SourceIdentifier identifier, final Node root) {
-        super(identifier);
+    private YinStatementStreamSource(final SourceIdentifier sourceId, final Node root) {
+        super(sourceId);
         this.root = requireNonNull(root);
     }
 
-    public static StatementStreamSource create(final YinXmlSchemaSource source) throws TransformerException {
-        return create(YinDomSchemaSource.transform(source));
+    public static StatementStreamSource create(final YinXmlSource source) throws TransformerException {
+        return create(YinDomSource.transform(source));
     }
 
-    public static StatementStreamSource create(final YinDomSchemaSource source) {
-        return new YinStatementStreamSource(source.getIdentifier(), source.getSource().getNode());
+    public static StatementStreamSource create(final YinDomSource source) {
+        return new YinStatementStreamSource(source.sourceId(), source.getSource().getNode());
     }
 
     private static StatementDefinition getValidDefinition(final Node node, final StatementWriter writer,