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