public final class YinExportUtils extends Object
Modifier and Type | Method and Description |
---|---|
static String |
wellFormedYinName(String name,
Optional<Revision> revision)
Returns well-formed file name of YIN file as defined in RFC6020.
|
static String |
wellFormedYinName(String name,
String revision)
Returns well-formed file name of YIN file as defined in RFC6020.
|
static void |
writeModuleAsYinText(Module module,
OutputStream output)
Write a module as a YIN text into specified
OutputStream . |
static void |
writeModuleToOutputStream(SchemaContext ctx,
Module module,
OutputStream str)
Deprecated.
|
static void |
writeModuleToOutputStream(SchemaContext ctx,
Module module,
OutputStream str,
boolean emitInstantiated)
Deprecated.
|
static void |
writeSubmoduleAsYinText(Module parentModule,
Module submodule,
OutputStream output)
Write a submodule as a YIN text into specified
OutputStream . |
public static String wellFormedYinName(String name, Optional<Revision> revision)
name
- Module or submodule namerevision
- Revision of module or submodulepublic static String wellFormedYinName(String name, String revision)
name
- name Module or submodule namerevision
- Revision of module or submodule@Beta public static void writeModuleAsYinText(Module module, OutputStream output) throws XMLStreamException
OutputStream
. Supplied module must have the
ModuleEffectiveStatement
trait.module
- Module to be exportedIllegalArgumentException
- if the module is not an ModuleEffectiveStatement or if it declared
representation is not available.NullPointerException
- if any of of the parameters is nullXMLStreamException
- if an input-output error occurs@Beta public static void writeSubmoduleAsYinText(Module parentModule, Module submodule, OutputStream output) throws XMLStreamException
OutputStream
. Supplied submodule must have the
SubmoduleEffectiveStatement
trait.parentModule
- Parent modulesubmodule
- Submodule to be exportedIllegalArgumentException
- if the parent module is not a ModuleEffectiveStatement, if the submodule is not
a SubmoduleEffectiveStatement or if its declared representation is not availableNullPointerException
- if any of of the parameters is nullXMLStreamException
- if an input-output error occurs@Deprecated public static void writeModuleToOutputStream(SchemaContext ctx, Module module, OutputStream str) throws XMLStreamException
writeModuleAsYinText(Module, OutputStream)
or writeSubmoduleAsYinText(Module, Module, OutputStream)
instead.ctx
- Schema Context which contains module and extension definitions to be used during export of model.module
- Module to be exported.str
- Output stream to which YIN representation of model will be written.XMLStreamException
- when a streaming problem occurs@Deprecated public static void writeModuleToOutputStream(SchemaContext ctx, Module module, OutputStream str, boolean emitInstantiated) throws XMLStreamException
writeModuleAsYinText(Module, OutputStream)
or writeSubmoduleAsYinText(Module, Module, OutputStream)
instead.ctx
- Schema Context which contains module and extension definitions to be used during export of model.module
- Module to be exported.str
- Output stream to which YIN representation of model will be written.emitInstantiated
- Option to emit also instantiated statements (e.g. statements added by uses or augment)XMLStreamException
- when a streaming problem occursCopyright © 2019 OpenDaylight. All rights reserved.