Class Serializer


  • public class Serializer
    extends java.lang.Object
    Transform a Node Graph to Event stream and allow provided Emitable to present the Events into the output stream
    • Field Detail

      • emitable

        private final Emitable emitable
      • serializedNodes

        private final java.util.Set<Node> serializedNodes
      • anchors

        private final java.util.Map<Node,​Anchor> anchors
    • Constructor Detail

      • Serializer

        public Serializer​(DumpSettings settings,
                          Emitable emitable)
        Create Serializer
        Parameters:
        settings - - dump configuration
        emitable - - destination for the event stream
    • Method Detail

      • serializeDocument

        public void serializeDocument​(Node node)
        Serialize document
        Parameters:
        node - - the document root
      • anchorNode

        private void anchorNode​(Node node)
      • serializeNode

        private void serializeNode​(Node node)
        Recursive serialization of a Node
        Parameters:
        node - - content
      • serializeComments

        private void serializeComments​(java.util.List<CommentLine> comments)