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 |
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 occursCopyright © 2019 OpenDaylight. All rights reserved.