public final class YangTextSchemaContextResolver extends Object implements AutoCloseable, org.opendaylight.yangtools.yang.model.repo.spi.SchemaSourceProvider<org.opendaylight.yangtools.yang.model.repo.api.YangTextSchemaSource>
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static YangTextSchemaContextResolver |
create(String name) |
Set<org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier> |
getAvailableSources()
Return the set of sources currently available in this resolved.
|
Optional<org.opendaylight.yangtools.yang.model.api.SchemaContext> |
getSchemaContext()
Try to parse all currently available yang files and build new schema context.
|
Optional<org.opendaylight.yangtools.yang.model.api.SchemaContext> |
getSchemaContext(org.opendaylight.yangtools.yang.model.repo.api.StatementParserMode statementParserMode)
Try to parse all currently available yang files and build new schema context depending on specified parsing mode.
|
com.google.common.util.concurrent.FluentFuture<org.opendaylight.yangtools.yang.model.repo.api.YangTextSchemaSource> |
getSource(org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier sourceIdentifier) |
Collection<org.opendaylight.yangtools.yang.model.repo.api.YangTextSchemaSource> |
getSourceTexts(org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier sourceIdentifier) |
YangTextSchemaSourceRegistration |
registerSource(URL url)
Register a URL containing a YANG text.
|
YangTextSchemaSourceRegistration |
registerSource(org.opendaylight.yangtools.yang.model.repo.api.YangTextSchemaSource source)
Register a
YangTextSchemaSource. |
org.opendaylight.yangtools.yang.model.api.SchemaContext |
trySchemaContext() |
org.opendaylight.yangtools.yang.model.api.SchemaContext |
trySchemaContext(org.opendaylight.yangtools.yang.model.repo.api.StatementParserMode statementParserMode) |
public static YangTextSchemaContextResolver create(String name)
public YangTextSchemaSourceRegistration registerSource(@Nonnull org.opendaylight.yangtools.yang.model.repo.api.YangTextSchemaSource source) throws org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceException, IOException, org.opendaylight.yangtools.yang.model.parser.api.YangSyntaxErrorException
YangTextSchemaSource.source - YANG text sourceorg.opendaylight.yangtools.yang.model.parser.api.YangSyntaxErrorException - When the YANG file is syntactically invalidIOException - when the URL is not readableorg.opendaylight.yangtools.yang.model.repo.api.SchemaSourceException - When parsing encounters general errorpublic YangTextSchemaSourceRegistration registerSource(@Nonnull URL url) throws org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceException, IOException, org.opendaylight.yangtools.yang.model.parser.api.YangSyntaxErrorException
url - YANG text source URLorg.opendaylight.yangtools.yang.model.parser.api.YangSyntaxErrorException - When the YANG file is syntactically invalidIOException - when the URL is not readableorg.opendaylight.yangtools.yang.model.repo.api.SchemaSourceException - When parsing encounters general errorpublic Optional<org.opendaylight.yangtools.yang.model.api.SchemaContext> getSchemaContext()
public Optional<org.opendaylight.yangtools.yang.model.api.SchemaContext> getSchemaContext(org.opendaylight.yangtools.yang.model.repo.api.StatementParserMode statementParserMode)
statementParserMode - mode of statement parserpublic com.google.common.util.concurrent.FluentFuture<org.opendaylight.yangtools.yang.model.repo.api.YangTextSchemaSource> getSource(org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier sourceIdentifier)
getSource in interface org.opendaylight.yangtools.yang.model.repo.spi.SchemaSourceProvider<org.opendaylight.yangtools.yang.model.repo.api.YangTextSchemaSource>public Set<org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier> getAvailableSources()
@Beta public Collection<org.opendaylight.yangtools.yang.model.repo.api.YangTextSchemaSource> getSourceTexts(org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier sourceIdentifier)
@Beta
public org.opendaylight.yangtools.yang.model.api.SchemaContext trySchemaContext()
throws org.opendaylight.yangtools.yang.model.repo.api.SchemaResolutionException
org.opendaylight.yangtools.yang.model.repo.api.SchemaResolutionException@Beta
public org.opendaylight.yangtools.yang.model.api.SchemaContext trySchemaContext(org.opendaylight.yangtools.yang.model.repo.api.StatementParserMode statementParserMode)
throws org.opendaylight.yangtools.yang.model.repo.api.SchemaResolutionException
org.opendaylight.yangtools.yang.model.repo.api.SchemaResolutionExceptionpublic void close()
close in interface AutoCloseableCopyright © 2019 OpenDaylight. All rights reserved.