Fixed implementation of TypeProviderImpl for Leafref resolving. 72/672/1
authorlsedlak <lsedlak@cisco.com>
Wed, 17 Apr 2013 14:21:26 +0000 (16:21 +0200)
committerMartin Vitez <mvitez@cisco.com>
Wed, 24 Jul 2013 11:44:51 +0000 (13:44 +0200)
commit2021e24f6ddf9a070da0fedebb01530320f24e1c
treeea5278cf0b4f0661fdb9312a1c7023f45ba5e9ee
parent0c14ad1f0f32b866983e0233b08704284bc0d447
Fixed implementation of TypeProviderImpl for Leafref resolving.

Since the modification of resolving of inner type definitions as
ExtendedTypes there had to be done minor modifications in
javaTypeForSchemaDefinitionType and baseTypeForExtendedType methods.
Also the SchemaPath no longer contains the module name as first element
so the module name is now retrieved directly from SchemaContext
via findModuleByNamespace method;

Added findModuleByName and findModuleByNamespace into SchemaContext in
yang-model-api;

Added implementation of findModuleByName and findModuleByNamespace for
private implementation of SchemaContextImpl in YangModelParserImpl;
Fixed possible resource leak in resolveModuleBuildersFromStreams in
YangModelBuilderImpl - implemented loadStreams and closeStreams methods;

Added implementation of test case for resolving of leafrefs and leafref
types from multiple modules;

Fixed wrong constructor call of Leafref Type Definition in parseTypeBody
method in YangModelBuilderUtil;

Fixed resolving of SchemaPath for Type statement in
YangModelParserListenerImpl;

Change-Id: I6a037a746562d856d12ea71d3fb095e902e1c204
Signed-off-by: Lukas Sedlak <lsedlak@cisco.com>
yang-model-api/src/main/java/org/opendaylight/controller/yang/model/api/SchemaContext.java