BUG-1196, Bug 886: Refactored implementation of Choice Codec 88/8088/4
authorMartin Vitez <mvitez@cisco.com>
Tue, 17 Jun 2014 11:12:13 +0000 (13:12 +0200)
committerMartin Vitez <mvitez@cisco.com>
Wed, 18 Jun 2014 07:25:38 +0000 (09:25 +0200)
commit0c907c7e0773f42b6f3da10bfbed632c2f6a9124
tree73402d45f422724947db235a4ab89d5753587707
parentbbb6d80f3c6ee0b355204b53f717d1838d8b3493
BUG-1196, Bug 886: Refactored implementation of Choice Codec

Choice Codec and instantiation of Choice Case codecs
was updated to reuse common reactive instatiation
of mixin codec provided by LocationAwareDispatchCodec
which provides utilities to retrieve all instantiation
of cases in their right context, so codecs
use corect namespaces and see only cases which
are really available in particular subtree.

Serialization of Cases was updated to
use namespace from schema context if and only
if case is added by augmentation.

Added test which test serialization / deserialization.

Change-Id: Id2ff269b6d124a35bdca7f687114d3fa123091d5
Signed-off-by: Martin Vitez <mvitez@cisco.com>
18 files changed:
code-generator/binding-generator-impl/src/main/java/org/opendaylight/yangtools/sal/binding/generator/impl/BindingGeneratorImpl.xtend
code-generator/binding-generator-impl/src/main/java/org/opendaylight/yangtools/sal/binding/generator/impl/BindingSchemaContextUtils.java
code-generator/binding-generator-impl/src/main/java/org/opendaylight/yangtools/sal/binding/generator/impl/CodecMapping.java
code-generator/binding-generator-impl/src/main/java/org/opendaylight/yangtools/sal/binding/generator/impl/LazyGeneratedCodecRegistry.java
code-generator/binding-generator-impl/src/main/java/org/opendaylight/yangtools/sal/binding/generator/impl/ModuleContext.java
code-generator/binding-generator-impl/src/main/java/org/opendaylight/yangtools/sal/binding/generator/impl/TransformerGenerator.xtend
common/parent/pom.xml
integration-test/bug1196-test-model/pom.xml [new file with mode: 0644]
integration-test/bug1196-test-model/src/main/yang/network-topology-pcep.yang [new file with mode: 0644]
integration-test/bug1196-test-model/src/main/yang/network-topology-unix.yang [new file with mode: 0644]
integration-test/bug1196-test-model/src/main/yang/network-topology@2013-10-21.yang [new file with mode: 0644]
integration-test/bug1196-test-model/src/main/yang/odl-pcep-ietf-stateful07.yang [new file with mode: 0644]
integration-test/bug1196-test-model/src/main/yang/pcep-types.yang [new file with mode: 0644]
integration-test/pom.xml
restconf/restconf-util/pom.xml
restconf/restconf-util/src/test/java/org/opendaylight/yangtools/restconf/utils/Bug1196Test.java [new file with mode: 0644]
restconf/restconf-util/src/test/resources/topology-bug1196-linux.xml [new file with mode: 0644]
restconf/restconf-util/src/test/resources/topology-bug1196-unix.xml [new file with mode: 0644]