public abstract class YangModelDependencyInfo extends Object
There are two concrete implementations of this interface:
YangModelDependencyInfo.ModuleDependencyInfo
- Dependency information for moduleYangModelDependencyInfo.SubmoduleDependencyInfo
- Dependency information for submoduleModifier and Type | Class and Description |
---|---|
static class |
YangModelDependencyInfo.ModuleDependencyInfo
Dependency information for YANG module.
|
static class |
YangModelDependencyInfo.SubmoduleDependencyInfo
Dependency information for submodule, also provides name for parent module.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
static YangModelDependencyInfo |
forResource(Class<?> refClass,
String resourceName)
Extracts
YangModelDependencyInfo from input stream containing a YANG model. |
com.google.common.collect.ImmutableSet<ModuleImport> |
getDependencies()
Returns immutable collection of all module imports.
|
String |
getFormattedRevision()
Returns formatted revision string.
|
static String |
getLatestRevision(YangStatementParser.StatementContext module,
SourceIdentifier source) |
String |
getName()
Returns model name.
|
Optional<Revision> |
getRevision()
Returns revision.
|
Optional<SemVer> |
getSemanticVersion()
Returns semantic version of module.
|
int |
hashCode() |
public com.google.common.collect.ImmutableSet<ModuleImport> getDependencies()
import
statements
and include
statements for submodules.public String getName()
public String getFormattedRevision()
public Optional<Revision> getRevision()
public Optional<SemVer> getSemanticVersion()
public static YangModelDependencyInfo forResource(Class<?> refClass, String resourceName) throws IOException, YangSyntaxErrorException
YangModelDependencyInfo
from input stream containing a YANG model. This parsing does not
validate full YANG module, only parses header up to the revisions and imports.refClass
- Base search classresourceName
- resource name, relative to refClassYangModelDependencyInfo
YangSyntaxErrorException
- If the resource does not pass syntactic analysisIOException
- When the resource cannot be readIllegalArgumentException
- If input stream is not valid YANG streampublic static String getLatestRevision(YangStatementParser.StatementContext module, SourceIdentifier source)
Copyright © 2019 OpenDaylight. All rights reserved.