2 * Copyright (c) 2020 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.restconf.nb.rfc8040.rests.services.impl;
10 import static java.util.Objects.requireNonNull;
12 import java.util.Collection;
13 import java.util.List;
14 import org.eclipse.jdt.annotation.NonNull;
15 import org.opendaylight.yangtools.yang.common.QName;
16 import org.opendaylight.yangtools.yang.common.QNameModule;
17 import org.opendaylight.yangtools.yang.common.XMLNamespace;
18 import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
19 import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
21 @Deprecated(forRemoval = true, since = "4.0.0")
22 final class OperationsRestconfModule extends AbstractOperationsModule {
23 // There is no need to intern this nor add a revision, as we are providing the corresponding context anyway
24 static final @NonNull QNameModule NAMESPACE =
25 QNameModule.create(XMLNamespace.of("urn:ietf:params:xml:ns:yang:ietf-restconf"));
27 private final OperationsContainerSchemaNode operations;
29 OperationsRestconfModule(final OperationsContainerSchemaNode operations) {
30 this.operations = requireNonNull(operations);
34 public String getName() {
35 return "ietf-restconf";
39 public QNameModule getQNameModule() {
44 public String getPrefix() {
49 public Collection<DataSchemaNode> getChildNodes() {
50 return List.of(operations);
54 public DataSchemaNode dataChildByName(final QName name) {
55 return operations.getQName().equals(requireNonNull(name)) ? operations : null;
59 public List<EffectiveStatement<?, ?>> effectiveSubstatements() {
60 // This is not accurate, but works for now