@Override public AnyxmlEffectiveStatement createEffective( final StmtContext<QName, AnyxmlStatement, AnyxmlEffectiveStatement> ctx) { final AnyxmlEffectiveStatement delegateStatement = delegate().createEffective(ctx); final Map<StatementDefinition, Mutable<SchemaNodeIdentifier, AnyxmlSchemaLocationStatement, EffectiveStatement<SchemaNodeIdentifier, AnyxmlSchemaLocationStatement>>> schemaLocations = ctx.getAllFromCurrentStmtCtxNamespace(AnyxmlSchemaLocationNamespace.class); if (schemaLocations != null && !schemaLocations.isEmpty()) { final SchemaNodeIdentifier anyXmlSchemaNodeIdentifier = schemaLocations.values().iterator().next() .getStatementArgument(); final Optional<ContainerSchemaNode> anyXmlSchema = getAnyXmlSchema(ctx, anyXmlSchemaNodeIdentifier); if (anyXmlSchema.isPresent()) { return new YangModeledAnyxmlEffectiveStatementImpl(delegateStatement, anyXmlSchema.get()); } } return delegateStatement; }
@Override public AnyxmlEffectiveStatement createEffective( final StmtContext<QName, AnyxmlStatement, AnyxmlEffectiveStatement> ctx) { final AnyxmlEffectiveStatement delegateStatement = delegate().createEffective(ctx); final Map<StatementDefinition, Mutable<SchemaNodeIdentifier, AnyxmlSchemaLocationStatement, EffectiveStatement<SchemaNodeIdentifier, AnyxmlSchemaLocationStatement>>> schemaLocations = ctx.getAllFromCurrentStmtCtxNamespace(AnyxmlSchemaLocationNamespace.class); if (schemaLocations != null && !schemaLocations.isEmpty()) { final SchemaNodeIdentifier anyXmlSchemaNodeIdentifier = schemaLocations.values().iterator().next() .getStatementArgument(); final Optional<ContainerSchemaNode> anyXmlSchema = getAnyXmlSchema(ctx, anyXmlSchemaNodeIdentifier); if (anyXmlSchema.isPresent()) { return new YangModeledAnyxmlEffectiveStatementImpl(delegateStatement, anyXmlSchema.get()); } } return delegateStatement; }
ctx.getAllFromCurrentStmtCtxNamespace(IncludedSubmoduleNameToModuleCtx.class); nameToSubmodule = submodules == null ? ImmutableMap.of() : ImmutableMap.copyOf(Maps.transformValues(submodules, ctx.getAllFromCurrentStmtCtxNamespace(ExtensionNamespace.class); qnameToExtension = extensions == null ? ImmutableMap.of() : ImmutableMap.copyOf(Maps.transformValues(extensions, stmt -> (ExtensionEffectiveStatement) stmt.buildEffective())); final Map<QName, StmtContext<?, FeatureStatement, EffectiveStatement<QName, FeatureStatement>>> features = ctx.getAllFromCurrentStmtCtxNamespace(FeatureNamespace.class); qnameToFeature = features == null ? ImmutableMap.of() : ImmutableMap.copyOf(Maps.transformValues(features, stmt -> (FeatureEffectiveStatement) stmt.buildEffective())); final Map<QName, StmtContext<?, IdentityStatement, EffectiveStatement<QName, IdentityStatement>>> identities = ctx.getAllFromCurrentStmtCtxNamespace(IdentityNamespace.class); qnameToIdentity = identities == null ? ImmutableMap.of() : ImmutableMap.copyOf(Maps.transformValues(identities,
.getAllFromCurrentStmtCtxNamespace(IncludedSubmoduleNameToModuleCtx.class);