Remove deprecated Yin/YangStatementSourceImpl
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / stmt / reactor / CrossSourceStatementReactor.java
index 3e4ff416403947fead54af1a82cb3ddef8f7cae3..7ac2bc6c12a9c980df639b9f42949490080ec822 100644 (file)
@@ -9,30 +9,21 @@ package org.opendaylight.yangtools.yang.parser.stmt.reactor;
 
 import com.google.common.base.Preconditions;
 import com.google.common.collect.ImmutableMap;
-import com.google.common.io.ByteSource;
-import java.io.IOException;
-import java.io.InputStream;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.EnumMap;
-import java.util.List;
 import java.util.Map;
 import java.util.Optional;
 import java.util.Set;
 import javax.annotation.Nonnull;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.common.QNameModule;
-import org.opendaylight.yangtools.yang.model.api.SchemaContext;
-import org.opendaylight.yangtools.yang.model.parser.api.YangSyntaxErrorException;
 import org.opendaylight.yangtools.yang.model.repo.api.StatementParserMode;
-import org.opendaylight.yangtools.yang.model.repo.api.YangTextSchemaSource;
-import org.opendaylight.yangtools.yang.parser.rfc6020.repo.YangStatementStreamSource;
 import org.opendaylight.yangtools.yang.parser.spi.meta.ModelProcessingPhase;
 import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StatementSupportBundle;
 import org.opendaylight.yangtools.yang.parser.spi.source.StatementStreamSource;
 import org.opendaylight.yangtools.yang.parser.spi.validation.ValidationBundlesNamespace.ValidationBundleType;
-import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.YangStatementSourceImpl;
 
 public final class CrossSourceStatementReactor {
     private final Map<ModelProcessingPhase, StatementSupportBundle> supportedTerminology;
@@ -276,42 +267,5 @@ public final class CrossSourceStatementReactor {
         public EffectiveSchemaContext buildEffective() throws ReactorException {
             return context.buildEffective();
         }
-
-        /**
-         * Add specified sources and assemble the resulting SchemaContext.
-         *
-         * @deprecated Use {@link #addSources(Collection)} and {@link #buildEffective()} instead.
-         */
-        @Deprecated
-        public SchemaContext buildEffective(final Collection<ByteSource> yangByteSources) throws ReactorException,
-                IOException {
-            for (final ByteSource source : yangByteSources) {
-                if (source instanceof YangTextSchemaSource) {
-                    try {
-                        addSource(YangStatementStreamSource.create((YangTextSchemaSource) source));
-                    } catch (YangSyntaxErrorException e) {
-                        throw new IOException("Source " + source + " failed to parse", e);
-                    }
-                } else {
-                    addSource(new YangStatementSourceImpl(source.openStream()));
-                }
-            }
-
-            return buildEffective();
-        }
-
-        /**
-         * Add specified sources and assemble the resulting SchemaContext.
-         *
-         * @deprecated Use {@link #addSources(Collection)} and {@link #buildEffective()} instead.
-         */
-        @Deprecated
-        public SchemaContext buildEffective(final List<InputStream> yangInputStreams) throws ReactorException {
-            for (final InputStream yangInputStream : yangInputStreams) {
-                addSource(new YangStatementSourceImpl(yangInputStream));
-            }
-
-            return buildEffective();
-        }
     }
 }