BUG 2155 - depth parameter in NormalizedNodeWriter 27/12227/4
authorJozef Gloncak <jgloncak@cisco.com>
Fri, 24 Oct 2014 08:43:48 +0000 (10:43 +0200)
committerJozef Gloncak <jgloncak@cisco.com>
Wed, 29 Oct 2014 06:49:13 +0000 (06:49 +0000)
commit330931d20f45da8d1b4d8480743de8876bfa7212
tree389608c0b1515f116c2130d2bba45e1d458d5f0a
parenta05b35cba548b76da64fe2be868e2c536803764c
BUG 2155 - depth parameter in NormalizedNodeWriter

For stable helium

- NormalizedNodeWriter - added depth class field (maxDepth, currentDepth)
  to make it possible to manage how deeply will be normalized node
  structure walked during generating output strea (JSON, XML).
  Presence of various normalized node will change current depth as
  follows:
  - ContainerNode = +1,
  - ListEntryNode (MapEntryNode, UnkeyedListEntryNode) = +1,
  - calling of endNode() method will decrease currentDepth by 1.

Change-Id: I7342581f4a1de25f8e8bb50ac0933258d7e3bce5
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/stream/NormalizedNodeWriter.java
yang/yang-data-codec-gson/src/main/java/org/opendaylight/yangtools/yang/data/codec/gson/JSONStreamWriterContext.java