Class YinStatementStreamSource
java.lang.Object
org.opendaylight.yangtools.concepts.AbstractIdentifiable<SourceIdentifier,SourceIdentifier>
org.opendaylight.yangtools.concepts.AbstractSimpleIdentifiable<SourceIdentifier>
org.opendaylight.yangtools.yang.parser.rfc7950.repo.YinStatementStreamSource
- All Implemented Interfaces:
Identifiable<SourceIdentifier>
,StatementStreamSource
@Beta
public final class YinStatementStreamSource
extends AbstractSimpleIdentifiable<SourceIdentifier>
implements StatementStreamSource
A
StatementStreamSource
based on a YinXmlSource
. Internal implementation works on top
of YinDomSource
and its DOM document.- Author:
- Robert Varga
-
Method Summary
Modifier and TypeMethodDescriptionstatic StatementStreamSource
create
(YinDomSource source) static StatementStreamSource
create
(YinXmlSource source) void
writeFull
(StatementWriter writer, QNameToStatementDefinition stmtDef, PrefixResolver prefixes, YangVersion yangVersion) Emits every statements present in this statement source to suppliedwriter
based on specified yang version.void
writeLinkage
(StatementWriter writer, QNameToStatementDefinition stmtDef, PrefixResolver preLinkagePrefixes, YangVersion yangVersion) Emits only linkage-related statements to suppliedwriter
based on specified YANG version.void
writeLinkageAndStatementDefinitions
(StatementWriter writer, QNameToStatementDefinition stmtDef, PrefixResolver prefixes, YangVersion yangVersion) Emits only linkage and language extension statements to suppliedwriter
based on specified YANG version.void
writePreLinkage
(StatementWriter writer, QNameToStatementDefinition stmtDef) Emits only pre-linkage-related statements to suppliedwriter
.Methods inherited from class org.opendaylight.yangtools.concepts.AbstractIdentifiable
addToStringAttributes, getIdentifier, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.opendaylight.yangtools.concepts.Identifiable
getIdentifier
-
Method Details
-
create
- Throws:
TransformerException
-
create
-
writePreLinkage
Description copied from interface:StatementStreamSource
Emits only pre-linkage-related statements to suppliedwriter
.- Specified by:
writePreLinkage
in interfaceStatementStreamSource
- Parameters:
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.
-
writeLinkage
public void writeLinkage(StatementWriter writer, QNameToStatementDefinition stmtDef, PrefixResolver preLinkagePrefixes, YangVersion yangVersion) Description copied from interface:StatementStreamSource
Emits only linkage-related statements to suppliedwriter
based on specified YANG version. Default implementation does not make any differences between versions.- Specified by:
writeLinkage
in interfaceStatementStreamSource
- Parameters:
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.
-
writeLinkageAndStatementDefinitions
public void writeLinkageAndStatementDefinitions(StatementWriter writer, QNameToStatementDefinition stmtDef, PrefixResolver prefixes, YangVersion yangVersion) Description copied from interface:StatementStreamSource
Emits only linkage and language extension statements to suppliedwriter
based on specified YANG version. Default implementation does not make any differences between versions.- Specified by:
writeLinkageAndStatementDefinitions
in interfaceStatementStreamSource
- Parameters:
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.
-
writeFull
public void writeFull(StatementWriter writer, QNameToStatementDefinition stmtDef, PrefixResolver prefixes, YangVersion yangVersion) Description copied from interface:StatementStreamSource
Emits every statements present in this statement source to suppliedwriter
based on specified yang version. Default implementation does not make any differences between versions.- Specified by:
writeFull
in interfaceStatementStreamSource
- Parameters:
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.
-