@Beta
public interface YangParser
| Modifier and Type | Method and Description |
|---|---|
YangParser |
addLibSource(org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceRepresentation source) |
default @NonNull YangParser |
addLibSources(Collection<org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceRepresentation> sources) |
default @NonNull YangParser |
addLibSources(org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceRepresentation... sources)
Add library sources.
|
@NonNull YangParser |
addSource(org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceRepresentation source)
Add main source.
|
default @NonNull YangParser |
addSources(Collection<? extends org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceRepresentation> sources) |
default @NonNull YangParser |
addSources(org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceRepresentation... sources)
Add main sources.
|
@NonNull List<org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement<?>> |
buildDeclaredModel()
Build the declared view of a combined view of declared statements.
|
@NonNull org.opendaylight.yangtools.yang.model.api.EffectiveModelContext |
buildEffectiveModel()
Build the effective view of a combined view of effective statements.
|
default @NonNull org.opendaylight.yangtools.yang.model.api.SchemaContext |
buildSchemaContext()
Build effective
SchemaContext. |
@NonNull YangParser |
setModulesWithSupportedDeviations(@NonNull com.google.common.collect.SetMultimap<org.opendaylight.yangtools.yang.common.QNameModule,org.opendaylight.yangtools.yang.common.QNameModule> modulesDeviatedByModules)
Set YANG modules which can be deviated by specified modules during the parsing process.
|
@NonNull YangParser |
setSupportedFeatures(@NonNull Set<org.opendaylight.yangtools.yang.common.QName> supportedFeatures)
Set supported features based on which all if-feature statements in the parsed YANG modules will be resolved.
|
@NonNull Collection<Class<? extends org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceRepresentation>> |
supportedSourceRepresentations()
Return enumeration of concrete types of
SchemaSourceRepresentation parsers created from this factory
support. |
@NonNull Set<org.opendaylight.yangtools.yang.common.QName> |
supportedStatements()
Return the set of all YANG statements semantically supported by this parser instance.
|
@NonNull Collection<Class<? extends org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceRepresentation>> supportedSourceRepresentations()
SchemaSourceRepresentation parsers created from this factory
support. Users can use this information prepare the source they have to a representation which will be accepted
by this parser.@NonNull Set<org.opendaylight.yangtools.yang.common.QName> supportedStatements()
@NonNull YangParser addSource(org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceRepresentation source) throws IOException, YangSyntaxErrorException
source - which should be added into main sourcesYangSyntaxErrorException - when one of the sources fails syntactic analysisIOException - when an IO error occursIllegalArgumentException - if the representation is not supporteddefault @NonNull YangParser addSources(org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceRepresentation... sources) throws IOException, YangSyntaxErrorException
sources - which should be added into main sourcesYangSyntaxErrorException - when one of the sources fails syntactic analysisIOException - when an IO error occursIllegalArgumentException - if the representation is not supporteddefault @NonNull YangParser addSources(Collection<? extends org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceRepresentation> sources) throws IOException, YangSyntaxErrorException
IOExceptionYangSyntaxErrorExceptionYangParser addLibSource(org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceRepresentation source) throws IOException, YangSyntaxErrorException
IOExceptionYangSyntaxErrorExceptiondefault @NonNull YangParser addLibSources(org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceRepresentation... sources) throws IOException, YangSyntaxErrorException
Note: Library sources are not supported in semantic version mode currently.
sources - YANG sources which should be added into library sourcesYangSyntaxErrorException - when one of the sources fails syntactic analysisIOException - when an IO error occursIllegalArgumentException - if the representation is not supporteddefault @NonNull YangParser addLibSources(Collection<org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceRepresentation> sources) throws IOException, YangSyntaxErrorException
IOExceptionYangSyntaxErrorException@NonNull YangParser setSupportedFeatures(@NonNull Set<org.opendaylight.yangtools.yang.common.QName> supportedFeatures)
supportedFeatures - Set of supported features in the final SchemaContext. If the set is empty, no features
encountered will be supported.@NonNull YangParser setModulesWithSupportedDeviations(@NonNull com.google.common.collect.SetMultimap<org.opendaylight.yangtools.yang.common.QNameModule,org.opendaylight.yangtools.yang.common.QNameModule> modulesDeviatedByModules)
modulesDeviatedByModules - Map of YANG modules (Map key) which can be deviated by specified modules (Map
value) in the final SchemaContext. If the map is empty, no deviations encountered
will be supported.@NonNull List<org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement<?>> buildDeclaredModel() throws YangParserException
YangSyntaxErrorException - When a syntactic error is encountered.YangParserException@NonNull org.opendaylight.yangtools.yang.model.api.EffectiveModelContext buildEffectiveModel()
throws YangParserException
buildDeclaredModel() does not expose submodules as top-level contracts. These are available from their
respective parent modules.YangSyntaxErrorException - When a syntactic error is encountered.YangParserExceptiondefault @NonNull org.opendaylight.yangtools.yang.model.api.SchemaContext buildSchemaContext()
throws YangParserException
SchemaContext.YangSyntaxErrorException - When a syntactic error is encountered.YangParserExceptionCopyright © 2020 OpenDaylight. All rights reserved.