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)
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

index c497c3d169800e4dc061c343cea91578d543de38..e449dfaea0e8e6a13f704635bf0f1d6e33639fcd 100644 (file)
@@ -7,6 +7,8 @@
  */
 package org.opendaylight.controller.yang.model.api;
 
+import java.net.URI;
+import java.util.Date;
 import java.util.Set;
 
 
@@ -25,4 +27,8 @@ public interface SchemaContext {
     Set<RpcDefinition> getOperations();
     
     Set<ExtensionDefinition> getExtensions();
+    
+    Module findModuleByName(final String name, final Date revision);
+    
+    Module findModuleByNamespace(final URI namespace);
 }