*/
package org.opendaylight.yangtools.yang.model.util.repo;
-import org.opendaylight.yangtools.concepts.Delegator;
-
import com.google.common.annotations.Beta;
import com.google.common.base.Optional;
import com.google.common.base.Preconditions;
+import org.opendaylight.yangtools.concepts.Delegator;
/**
*
* @param <I> Input Schema Source Representation
* @param <O> Output Schema Source Representation
+ *
+ * @deprecated Replaced with {@link org.opendaylight.yangtools.yang.model.repo.util.AbstractSchemaSourceCache}
*/
+@Deprecated
public abstract class AbstractCachingSchemaSourceProvider<I, O> implements AdvancedSchemaSourceProvider<O>,
Delegator<AdvancedSchemaSourceProvider<I>> {
*
* @param <T>
* Schema source representation type provided by this implementation
+ *
+ * @deprecated Replaced with {@link org.opendaylight.yangtools.yang.model.repo.spi.SchemaSourceProvider}
+ * and related APIs.
*/
+@Deprecated
public interface AdvancedSchemaSourceProvider<T> extends SchemaSourceProvider<T> {
/**
*/
package org.opendaylight.yangtools.yang.model.util.repo;
+import com.google.common.base.Charsets;
+import com.google.common.base.Function;
+import com.google.common.base.Optional;
+import com.google.common.base.Preconditions;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.util.TreeMap;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.google.common.base.Charsets;
-import com.google.common.base.Function;
-import com.google.common.base.Optional;
-import com.google.common.base.Preconditions;
-
/**
* Filesystem-based schema caching source provider
*
* @param <I>
* Input format in which schema source is represented.
*
+ * @deprecated Replaced with {@link org.opendaylight.yangtools.yang.model.repo.util.FilesystemSchemaSourceCache}
+ *
*/
+@Deprecated
public final class FilesystemSchemaCachingProvider<I> extends AbstractCachingSchemaSourceProvider<I, InputStream> {
private static final Logger LOG = LoggerFactory.getLogger(FilesystemSchemaCachingProvider.class);
public static final Pattern REVISION_PATTERN = Pattern.compile("\\d\\d\\d\\d-\\d\\d-\\d\\d");
* for other components.
*
* @param <F> Format in which YANG source is represented.
+ * @deprecated Repalced With {@link AdvancedSchemaSourceProvider}
*/
+@Deprecated
public interface SchemaSourceProvider<F> {
/**
*/
package org.opendaylight.yangtools.yang.model.util.repo;
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-
-import org.opendaylight.yangtools.concepts.Delegator;
-
import com.google.common.base.Charsets;
import com.google.common.base.Function;
import com.google.common.base.Optional;
import com.google.common.base.Preconditions;
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import org.opendaylight.yangtools.concepts.Delegator;
/**
*
* Utility functions for {@link SchemaSourceProvider}
*
+ *
+ * @deprecated Utility classes for deprecated APIs.
*/
+@Deprecated
public final class SchemaSourceProviders {
@SuppressWarnings("rawtypes")
*
* @param <I> Input schema source representation
* @param <O> Output schema source representation
+ *
+ * @deprecated Replaced with {@link org.opendaylight.yangtools.yang.model.repo.util.SchemaSourceTransformer}
*/
@Beta
+@Deprecated
public interface SchemaSourceTransformation<I, O> {
/**
*/
package org.opendaylight.yangtools.yang.model.util.repo;
-import org.opendaylight.yangtools.concepts.Immutable;
-
import com.google.common.base.Optional;
+import org.opendaylight.yangtools.concepts.Immutable;
/**
*
* http://tools.ietf.org/html/rfc6022#section-3.1 ).
*
*
+ * @deprecated Replaced with {@link org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier}
*/
+@Deprecated
public final class SourceIdentifier implements Immutable {
private final String name;
package org.opendaylight.yangtools.yang.model.util.repo;
-import org.opendaylight.yangtools.concepts.Delegator;
-
import com.google.common.base.Optional;
import com.google.common.base.Preconditions;
+import org.opendaylight.yangtools.concepts.Delegator;
/**
*
* Representation of schema sources used by delegate
* @param <O>
* Representation of schema sources exposed by this provider
+ *
+ * @deprecated Replaced with {@link org.opendaylight.yangtools.yang.model.repo.util.SchemaSourceTransformer}
*/
+@Deprecated
public final class TransformingSourceProvider<I, O> implements //
AdvancedSchemaSourceProvider<O>, Delegator<AdvancedSchemaSourceProvider<I>> {
* @see SubmoduleDependencyInfo
*
*/
+
public abstract class YangModelDependencyInfo {
private final String name;
*
*/
// FIXME: for some reason this class is Closeable even though close is never called and no resources are leaked
+@Deprecated
@ThreadSafe
public class YangSourceContext implements AdvancedSchemaSourceProvider<InputStream>, Closeable,
Delegator<AdvancedSchemaSourceProvider<InputStream>> {
/**
* Construct YANG Source Context
- *
+ *
* @param validSourcesSet Set of identifiers of valid sources
* @param missingSourcesSet Set of identifiers of missing sources
* @param missingDependenciesMap Map of identifiers of resolved sources and their missing imports.
- * @param sourceProvider Source provider which was used for context resolution or
+ * @param sourceProvider Source provider which was used for context resolution or
* null if provider was not used.
*/
YangSourceContext(final ImmutableSet<SourceIdentifier> validSourcesSet,
* </ul>
*
*/
+@Deprecated
@NotThreadSafe
public abstract class YangSourceContextResolver {
/**
- *
+ *
* State of source code resolution
- *
+ *
*/
public enum ResolutionState {
/**
- *
+ *
* Source was missing during source resolution
- *
+ *
*/
- MISSING_SOURCE,
+ MISSING_SOURCE,
/**
- *
- * One or multiple of dependencies of source are missing
- *
+ *
+ * One or multiple of dependencies of source are missing
+ *
*/
- MISSING_DEPENDENCY,
+ MISSING_DEPENDENCY,
/**
* Other error ocurred during resolution
- *
+ *
*/
- OTHER_ERROR,
+ OTHER_ERROR,
/**
* Source, its dependencies and its transient dependencies
* are resolved.
- *
+ *
*/
EVERYTHING_OK,
}
* and there is {@link SchemaSourceProvider} able to retrieve YANG models.
*
*/
+@Deprecated
public final class YangSourceFromCapabilitiesResolver extends YangSourceContextResolver {
private final Iterable<QName> capabilities;
* {@link YangSourceContext}.
*
*/
+@Deprecated
@NotThreadSafe
public final class YangSourceFromDependencyInfoResolver extends YangSourceContextResolver {
import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier;
import org.opendaylight.yangtools.yang.parser.impl.util.YangModelDependencyInfo;
+@Deprecated
public class DependencyResolverTest {
@Test