@Beta public class URLSchemaContextResolver 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 URLSchemaContextResolver |
create(String name) |
com.google.common.base.Optional<org.opendaylight.yangtools.yang.model.api.SchemaContext> |
getSchemaContext()
Try to parse all currently available yang files and build new schema context.
|
com.google.common.util.concurrent.CheckedFuture<org.opendaylight.yangtools.yang.model.repo.api.YangTextSchemaSource,org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceException> |
getSource(org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier sourceIdentifier) |
URLRegistration |
registerSource(URL url)
Register a URL hosting a YANG Text file.
|
public static URLSchemaContextResolver create(String name)
public URLRegistration registerSource(URL url) throws org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceException, IOException, org.opendaylight.yangtools.yang.model.parser.api.YangSyntaxErrorException
url - 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 com.google.common.base.Optional<org.opendaylight.yangtools.yang.model.api.SchemaContext> getSchemaContext()
public com.google.common.util.concurrent.CheckedFuture<org.opendaylight.yangtools.yang.model.repo.api.YangTextSchemaSource,org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceException> 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 void close()
close in interface AutoCloseableCopyright © 2014. All rights reserved.