@Beta @NotThreadSafe public interface YangParser
Modifier and Type | Method and Description |
---|---|
YangParser |
addLibSource(SchemaSourceRepresentation source) |
default YangParser |
addLibSources(Collection<SchemaSourceRepresentation> sources) |
default YangParser |
addLibSources(SchemaSourceRepresentation... sources)
Add library sources.
|
YangParser |
addSource(SchemaSourceRepresentation source)
Add main source.
|
default YangParser |
addSources(Collection<? extends SchemaSourceRepresentation> sources) |
default YangParser |
addSources(SchemaSourceRepresentation... sources)
Add main sources.
|
List<DeclaredStatement<?>> |
buildDeclaredModel()
Build the declared view of a combined view of declared statements.
|
default Map<QNameModule,ModuleEffectiveStatement> |
buildEffectiveModel()
Build the effective view of a combined view of effective statements.
|
SchemaContext |
buildSchemaContext()
Build effective
SchemaContext . |
YangParser |
setModulesWithSupportedDeviations(@NonNull com.google.common.collect.SetMultimap<QNameModule,QNameModule> modulesDeviatedByModules)
Set YANG modules which can be deviated by specified modules during the parsing process.
|
YangParser |
setSupportedFeatures(@NonNull Set<QName> supportedFeatures)
Set supported features based on which all if-feature statements in the parsed YANG modules will be resolved.
|
Collection<Class<? extends SchemaSourceRepresentation>> |
supportedSourceRepresentations()
Return enumeration of concrete types of
SchemaSourceRepresentation parsers created from this factory
support. |
Set<QName> |
supportedStatements()
Return the set of all YANG statements semantically supported by this parser instance.
|
Collection<Class<? extends 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.Set<QName> supportedStatements()
YangParser addSource(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 YangParser addSources(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 YangParser addSources(Collection<? extends SchemaSourceRepresentation> sources) throws IOException, YangSyntaxErrorException
IOException
YangSyntaxErrorException
YangParser addLibSource(SchemaSourceRepresentation source) throws IOException, YangSyntaxErrorException
IOException
YangSyntaxErrorException
default YangParser addLibSources(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 YangParser addLibSources(Collection<SchemaSourceRepresentation> sources) throws IOException, YangSyntaxErrorException
IOException
YangSyntaxErrorException
YangParser setSupportedFeatures(@NonNull Set<QName> supportedFeatures)
supportedFeatures
- Set of supported features in the final SchemaContext. If the set is empty, no features
encountered will be supported.YangParser setModulesWithSupportedDeviations(@NonNull com.google.common.collect.SetMultimap<QNameModule,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.List<DeclaredStatement<?>> buildDeclaredModel() throws YangParserException
YangSyntaxErrorException
- When a syntactic error is encountered.YangParserException
default Map<QNameModule,ModuleEffectiveStatement> 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.YangParserException
SchemaContext buildSchemaContext() throws YangParserException
SchemaContext
.YangSyntaxErrorException
- When a syntactic error is encountered.YangParserException
Copyright © 2019 OpenDaylight. All rights reserved.