BUG-7052: Move RecursiveObjectLeader to util
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / stmt / rfc6020 / YangInferencePipeline.java
index e7c5828a3e0105763c17029d5c3b17d91be44ec6..11f603c463eceebb7f861b77990265084b79898f 100644 (file)
@@ -53,6 +53,7 @@ import org.opendaylight.yangtools.yang.parser.spi.source.ModuleNameToModuleQName
 import org.opendaylight.yangtools.yang.parser.spi.source.ModuleNameToNamespace;
 import org.opendaylight.yangtools.yang.parser.spi.source.ModuleNamespaceForBelongsTo;
 import org.opendaylight.yangtools.yang.parser.spi.source.ModuleQNameToModuleName;
+import org.opendaylight.yangtools.yang.parser.spi.source.ModulesDeviatedByModules;
 import org.opendaylight.yangtools.yang.parser.spi.source.PrefixToModule;
 import org.opendaylight.yangtools.yang.parser.spi.source.QNameToStatementDefinition;
 import org.opendaylight.yangtools.yang.parser.spi.source.StmtOrderingNamespace;
@@ -84,6 +85,7 @@ import org.opendaylight.yangtools.yang.parser.stmt.rfc7950.PatternStatementRfc79
 import org.opendaylight.yangtools.yang.parser.stmt.rfc7950.RefineStatementRfc7950Support;
 import org.opendaylight.yangtools.yang.parser.stmt.rfc7950.RpcStatementRfc7950Support;
 import org.opendaylight.yangtools.yang.parser.stmt.rfc7950.SubmoduleStatementRfc7950Support;
+import org.opendaylight.yangtools.yang.parser.stmt.rfc7950.TypeStatementRfc7950Support;
 
 public final class YangInferencePipeline {
     public static final Set<YangVersion> SUPPORTED_VERSIONS = Sets.immutableEnumSet(VERSION_1, VERSION_1_1);
@@ -91,6 +93,7 @@ public final class YangInferencePipeline {
     public static final StatementSupportBundle INIT_BUNDLE = StatementSupportBundle
             .builder(SUPPORTED_VERSIONS).addSupport(global(ValidationBundlesNamespace.class))
             .addSupport(global(SupportedFeaturesNamespace.class))
+            .addSupport(global(ModulesDeviatedByModules.class))
             .build();
 
     public static final StatementSupportBundle PRE_LINKAGE_BUNDLE = StatementSupportBundle
@@ -140,7 +143,7 @@ public final class YangInferencePipeline {
             .addSupport(sourceLocal(BelongsToModuleContext.class))
             .addSupport(sourceLocal(QNameToStatementDefinition.class))
             .addSupport(sourceLocal(BelongsToPrefixToModuleName.class))
-            .addSupport(new SemanticVersionStatementImpl.SemanticVersionSupport())
+            .addSupport(new OpenconfigVersionStatementImpl.OpenconfigVersionSupport())
             .addSupport(global(SemanticVersionNamespace.class))
             .addSupport(global(SemanticVersionModuleNamespace.class))
             .addSupport(sourceLocal(ImpPrefixToSemVerModuleIdentifier.class))
@@ -161,7 +164,8 @@ public final class YangInferencePipeline {
             .addSupport(global(IdentityNamespace.class))
             .addSupport(new DefaultStatementImpl.Definition())
             .addSupport(new StatusStatementImpl.Definition())
-            .addSupport(new TypeStatementImpl.Definition())
+            .addVersionSpecificSupport(VERSION_1, new TypeStatementImpl.Definition())
+            .addVersionSpecificSupport(VERSION_1_1, new TypeStatementRfc7950Support())
             .addSupport(new UnitsStatementImpl.Definition())
             .addSupport(new RequireInstanceStatementImpl.Definition())
             .addVersionSpecificSupport(VERSION_1, new BitStatementImpl.Definition())
@@ -234,6 +238,7 @@ public final class YangInferencePipeline {
             .addSupport(new ValueStatementImpl.Definition())
             .addSupport(new AnyxmlSchemaLocationStatementImpl.AnyxmlSchemaLocationSupport())
             .addSupport(treeScoped(AnyxmlSchemaLocationNamespace.class))
+            .addSupport(new YangDataStatementImpl.YangDataSupport())
             .addSupport(global(StmtOrderingNamespace.class))
             .build();