2 * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.yangtools.rfc6241.parser;
10 import com.google.common.collect.ImmutableList;
11 import org.eclipse.jdt.annotation.NonNull;
12 import org.opendaylight.yangtools.concepts.Immutable;
13 import org.opendaylight.yangtools.rfc6241.model.api.GetFilterElementAttributesEffectiveStatement;
14 import org.opendaylight.yangtools.rfc6241.model.api.GetFilterElementAttributesSchemaNode;
15 import org.opendaylight.yangtools.rfc6241.model.api.GetFilterElementAttributesStatement;
16 import org.opendaylight.yangtools.yang.common.Empty;
17 import org.opendaylight.yangtools.yang.common.QName;
18 import org.opendaylight.yangtools.yang.model.api.SchemaNodeDefaults;
19 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
20 import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
21 import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.UnknownEffectiveStatementBase;
22 import org.opendaylight.yangtools.yang.parser.spi.meta.EffectiveStmtCtx.Current;
23 import org.opendaylight.yangtools.yang.parser.spi.meta.SchemaPathSupport;
25 final class GetFilterElementAttributesEffectiveStatementImpl
26 extends UnknownEffectiveStatementBase<Empty, GetFilterElementAttributesStatement>
27 implements GetFilterElementAttributesEffectiveStatement, GetFilterElementAttributesSchemaNode {
28 private final @NonNull Immutable path;
30 GetFilterElementAttributesEffectiveStatementImpl(final Current<Empty, GetFilterElementAttributesStatement> stmt,
31 final ImmutableList<? extends EffectiveStatement<?, ?>> substatements) {
32 super(stmt, substatements);
33 path = SchemaPathSupport.toEffectivePath(stmt.getEffectiveParent().getSchemaPath()
34 .createChild(stmt.publicDefinition().getStatementName()));
38 public QName getQName() {
39 return SchemaNodeDefaults.extractQName(path);
44 public SchemaPath getPath() {
45 return SchemaNodeDefaults.extractPath(this, path);
49 public GetFilterElementAttributesEffectiveStatement asEffectiveStatement() {