Class YinStatementStreamSource
- java.lang.Object
-
- org.opendaylight.yangtools.concepts.AbstractIdentifiable<T,T>
-
- 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
AStatementStreamSource
based on aYinXmlSchemaSource
. Internal implementation works on top ofYinDomSchemaSource
and its DOM document.- Author:
- Robert Varga
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StatementStreamSource
create(YinDomSchemaSource source)
static StatementStreamSource
create(YinXmlSchemaSource source)
void
writeFull(StatementWriter writer, QNameToStatementDefinition stmtDef, PrefixToModule prefixes, YangVersion yangVersion)
Emits every statements present in this statement source to suppliedwriter
based on specified yang version.void
writeLinkage(StatementWriter writer, QNameToStatementDefinition stmtDef, PrefixToModule preLinkagePrefixes, YangVersion yangVersion)
Emits only linkage-related statements to suppliedwriter
based on specified YANG version.void
writeLinkageAndStatementDefinitions(StatementWriter writer, QNameToStatementDefinition stmtDef, PrefixToModule 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 Detail
-
create
public static StatementStreamSource create(YinXmlSchemaSource source) throws TransformerException
- Throws:
TransformerException
-
create
public static StatementStreamSource create(YinDomSchemaSource source)
-
writePreLinkage
public void writePreLinkage(StatementWriter writer, QNameToStatementDefinition stmtDef)
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, PrefixToModule 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, PrefixToModule 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, PrefixToModule 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.
-
-