@Beta public final class YangStatementStreamSource extends AbstractIdentifiable<SourceIdentifier> implements StatementStreamSource
Modifier and Type | Method and Description |
---|---|
static YangStatementStreamSource |
create(ASTSchemaSource source)
Create a
YangStatementStreamSource for a ASTSchemaSource . |
static YangStatementStreamSource |
create(SourceIdentifier identifier,
YangStatementParser.StatementContext context,
String symbolicName) |
static YangStatementStreamSource |
create(YangTextSchemaSource source)
Create a
YangStatementStreamSource for a YangTextSchemaSource . |
org.antlr.v4.runtime.ParserRuleContext |
getYangAST() |
void |
writeFull(StatementWriter writer,
QNameToStatementDefinition stmtDef,
PrefixToModule prefixes,
YangVersion yangVersion)
Emits every statements present in this statement source to supplied
writer based on specified yang version. |
void |
writeLinkage(StatementWriter writer,
QNameToStatementDefinition stmtDef,
PrefixToModule preLinkagePrefixes,
YangVersion yangVersion)
Emits only linkage-related statements to supplied
writer based on specified YANG version. |
void |
writeLinkageAndStatementDefinitions(StatementWriter writer,
QNameToStatementDefinition stmtDef,
PrefixToModule prefixes,
YangVersion yangVersion)
Emits only linkage and language extension statements to supplied
writer based on specified YANG version. |
void |
writePreLinkage(StatementWriter writer,
QNameToStatementDefinition stmtDef)
Emits only pre-linkage-related statements to supplied
writer . |
addToStringAttributes, getIdentifier, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getIdentifier
public static YangStatementStreamSource create(YangTextSchemaSource source) throws IOException, YangSyntaxErrorException
YangStatementStreamSource
for a YangTextSchemaSource
.source
- YangTextSchemaSource, must not be nullYangStatementStreamSource
IOException
- When we fail to read the sourceYangSyntaxErrorException
- If the source fails basic parsingpublic static YangStatementStreamSource create(ASTSchemaSource source)
YangStatementStreamSource
for a ASTSchemaSource
.source
- YangTextSchemaSource, must not be nullYangStatementStreamSource
public static YangStatementStreamSource create(SourceIdentifier identifier, YangStatementParser.StatementContext context, String symbolicName)
public void writePreLinkage(StatementWriter writer, QNameToStatementDefinition stmtDef)
StatementStreamSource
writer
.writePreLinkage
in interface StatementStreamSource
writer
- StatementWriter
which should be used to emit
statements.stmtDef
- Map of available statement definitions. Only these statements
may be written to statement writer, source MUST ignore and MUST NOT
emit any other statements.public void writeLinkage(StatementWriter writer, QNameToStatementDefinition stmtDef, PrefixToModule preLinkagePrefixes, YangVersion yangVersion)
StatementStreamSource
writer
based on specified YANG version.
Default implementation does not make any differences between versions.writeLinkage
in interface StatementStreamSource
writer
- StatementWriter
which should be used to emit
statements.stmtDef
- Map of available statement definitions. Only these statements
may be written to statement writer, source MUST ignore and
MUST NOT emit any other statements.preLinkagePrefixes
- Pre-linkage map of source-specific prefixes to namespacesyangVersion
- yang version.public void writeLinkageAndStatementDefinitions(StatementWriter writer, QNameToStatementDefinition stmtDef, PrefixToModule prefixes, YangVersion yangVersion)
StatementStreamSource
writer
based on specified YANG version. Default implementation
does not make any differences between versions.writeLinkageAndStatementDefinitions
in interface StatementStreamSource
writer
- StatementWriter
which should be used to emit
statements.stmtDef
- Map of available statement definitions. Only these statements
may be written to statement writer, source MUST ignore and
MUST NOT emit any other statements.prefixes
- Map of source-specific prefixes to namespacesyangVersion
- YANG version.public void writeFull(StatementWriter writer, QNameToStatementDefinition stmtDef, PrefixToModule prefixes, YangVersion yangVersion)
StatementStreamSource
writer
based on specified yang version. Default implementation
does not make any differences between versions.writeFull
in interface StatementStreamSource
writer
- StatementWriter
which should be used to emit
statements.stmtDef
- Map of available statement definitions.prefixes
- Map of source-specific prefixes to namespacesyangVersion
- yang version.public org.antlr.v4.runtime.ParserRuleContext getYangAST()
Copyright © 2020 OpenDaylight. All rights reserved.