public class NodesYamlGenerator extends java.lang.Object implements NodesFileGenerator
INodeEntry
data. Nodes should be added with
the addNode(INodeEntry)
method, then generate()
called.Constructor and Description |
---|
NodesYamlGenerator(java.io.File destfile)
Serialize nodes data as yaml to a file.
|
NodesYamlGenerator(java.io.OutputStream outputStream)
Serialize nodes data as yaml to an outputstream.
|
NodesYamlGenerator(java.io.Writer writer)
Serialize nodes data as yaml to a writer.
|
Modifier and Type | Method and Description |
---|---|
void |
addNode(INodeEntry node)
Add Node object
|
void |
addNodes(java.util.Collection<INodeEntry> nodes)
Add all Node objects
|
void |
generate()
Generate output from the provided ndoes.
|
public NodesYamlGenerator(java.io.File destfile)
destfile
- destinationpublic NodesYamlGenerator(java.io.OutputStream outputStream)
outputStream
- outputpublic NodesYamlGenerator(java.io.Writer writer)
writer
- writerpublic void addNode(INodeEntry node)
NodesFileGenerator
addNode
in interface NodesFileGenerator
node
- nodepublic void addNodes(java.util.Collection<INodeEntry> nodes)
NodesFileGenerator
addNodes
in interface NodesFileGenerator
nodes
- the nodespublic void generate() throws java.io.IOException, NodesGeneratorException
NodesFileGenerator
generate
in interface NodesFileGenerator
java.io.IOException
- on io errorNodesGeneratorException
- on other error