org.jvyamlb
Class SerializerImpl

java.lang.Object
  extended by org.jvyamlb.SerializerImpl
All Implemented Interfaces:
Serializer

public class SerializerImpl
extends java.lang.Object
implements Serializer

Author:
Ola Bini

Field Summary
private  java.util.Map anchors
           
private  java.lang.String anchorTemplate
           
private  boolean closed
           
private  Emitter emitter
           
private  int lastAnchorId
           
private  boolean opened
           
private  YAMLConfig options
           
private  Resolver resolver
           
private  java.util.Map serializedNodes
           
private  boolean useExplicitEnd
           
private  boolean useExplicitStart
           
private  boolean useTags
           
private  int[] useVersion
           
 
Constructor Summary
SerializerImpl(Emitter emitter, Resolver resolver, YAMLConfig opts)
           
 
Method Summary
private  void anchorNode(Node node)
           
 void close()
           
private  java.lang.String generateAnchor(Node node)
           
protected  boolean ignoreAnchor(Node node)
           
 void open()
           
 void serialize(Node node)
           
private  void serializeNode(Node node, Node parent, java.lang.Object index)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

emitter

private Emitter emitter

resolver

private Resolver resolver

options

private YAMLConfig options

useExplicitStart

private boolean useExplicitStart

useExplicitEnd

private boolean useExplicitEnd

useVersion

private int[] useVersion

useTags

private boolean useTags

anchorTemplate

private java.lang.String anchorTemplate

serializedNodes

private java.util.Map serializedNodes

anchors

private java.util.Map anchors

lastAnchorId

private int lastAnchorId

closed

private boolean closed

opened

private boolean opened
Constructor Detail

SerializerImpl

public SerializerImpl(Emitter emitter,
                      Resolver resolver,
                      YAMLConfig opts)
Method Detail

ignoreAnchor

protected boolean ignoreAnchor(Node node)

open

public void open()
          throws java.io.IOException
Specified by:
open in interface Serializer
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Specified by:
close in interface Serializer
Throws:
java.io.IOException

serialize

public void serialize(Node node)
               throws java.io.IOException
Specified by:
serialize in interface Serializer
Throws:
java.io.IOException

anchorNode

private void anchorNode(Node node)

generateAnchor

private java.lang.String generateAnchor(Node node)

serializeNode

private void serializeNode(Node node,
                           Node parent,
                           java.lang.Object index)
                    throws java.io.IOException
Throws:
java.io.IOException