@NotThreadSafe public final class YangSourceFromDependencyInfoResolver extends YangSourceContextResolver
SchemaSourceProvider but supplied map
of source identifiers and YangModelDependencyInfo to construct
YangSourceContext.YangSourceContextResolver.ResolutionState| Constructor and Description |
|---|
YangSourceFromDependencyInfoResolver(Map<org.opendaylight.yangtools.yang.model.util.repo.SourceIdentifier,YangModelDependencyInfo> moduleDependencies,
org.opendaylight.yangtools.yang.model.util.repo.AdvancedSchemaSourceProvider<InputStream> sourceProvider) |
| Modifier and Type | Method and Description |
|---|---|
com.google.common.base.Optional<YangModelDependencyInfo> |
getDependencyInfo(org.opendaylight.yangtools.yang.model.util.repo.SourceIdentifier identifier)
Returns dependency information for provided identifier
Implementations are required to:
return
Optional.absent() If source code for source is not
present
return same dependency information for multiple invocations of this
method for same source identifier.
return latest available revision if SourceIdentifier does not
specify revision. |
YangSourceContext |
resolveContext()
Resolves
YangSourceContext
Implementators of this method should invoke
YangSourceContextResolver.resolveSource(SourceIdentifier) for sources which should be
present in YangSourceContext and YangSourceContextResolver.createSourceContext()
to create resulting YangSourceContext which will contain state
derived by callbacks to YangSourceContextResolver.getDependencyInfo(SourceIdentifier). |
createSourceContext, getSourceProvider, resolveSource, resolveSourcepublic YangSourceFromDependencyInfoResolver(Map<org.opendaylight.yangtools.yang.model.util.repo.SourceIdentifier,YangModelDependencyInfo> moduleDependencies, org.opendaylight.yangtools.yang.model.util.repo.AdvancedSchemaSourceProvider<InputStream> sourceProvider)
public com.google.common.base.Optional<YangModelDependencyInfo> getDependencyInfo(org.opendaylight.yangtools.yang.model.util.repo.SourceIdentifier identifier)
YangSourceContextResolverOptional.absent() If source code for source is not
presentSourceIdentifier does not
specify revision. If no revision is available Optional.absent()
MUST be returned.YangSourceContext
will be updated as following:
Optional.absent() is returned:
YangSourceContextResolver.ResolutionState.MISSING_SOURCE and
source identifier will be contained in -
YangSourceContext.getMissingSources()YangSourceContext.getMissingDependencies()identifier - Source identifierSourceIdentifier,
Optional.absent() if no source is present.public YangSourceContext resolveContext()
YangSourceContextResolverYangSourceContext
Implementators of this method should invoke
YangSourceContextResolver.resolveSource(SourceIdentifier) for sources which should be
present in YangSourceContext and YangSourceContextResolver.createSourceContext()
to create resulting YangSourceContext which will contain state
derived by callbacks to YangSourceContextResolver.getDependencyInfo(SourceIdentifier).resolveContext in class YangSourceContextResolverYangSourceContext.Copyright © 2014. All rights reserved.