Remove RevisionSourceIdentifier
[yangtools.git] / model / rfc6241-model-api / src / main / java / org / opendaylight / yangtools / rfc6241 / model / api / NetconfConstants.java
1 /*
2  * Copyright (c) 2019 PANTHEON.tech, s.r.o. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.yangtools.rfc6241.model.api;
9
10 import com.google.common.annotations.Beta;
11 import com.google.common.collect.ImmutableList;
12 import java.util.Collection;
13 import org.eclipse.jdt.annotation.NonNullByDefault;
14 import org.opendaylight.yangtools.yang.common.QNameModule;
15 import org.opendaylight.yangtools.yang.common.Revision;
16 import org.opendaylight.yangtools.yang.common.UnresolvedQName.Unqualified;
17 import org.opendaylight.yangtools.yang.common.XMLNamespace;
18 import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier;
19
20 /**
21  * Constants associated with RFC6241.
22  *
23  * @author Robert Varga
24  */
25 @Beta
26 @NonNullByDefault
27 public final class NetconfConstants {
28     private static final Unqualified MODULE_NAME = Unqualified.of("ietf-netconf").intern();
29     private static final XMLNamespace MODULE_NAMESPACE =
30         XMLNamespace.of("urn:ietf:params:xml:ns:netconf:base:1.0").intern();
31     private static final Revision RFC6241_REVISION = Revision.of("2011-06-01");
32
33     /**
34      * Runtime RFC6241 identity.
35      */
36     public static final QNameModule RFC6241_MODULE = QNameModule.create(MODULE_NAMESPACE, RFC6241_REVISION).intern();
37
38     /**
39      * RFC6241 model source name.
40      */
41     public static final SourceIdentifier RFC6241_SOURCE = new SourceIdentifier(MODULE_NAME, RFC6241_REVISION);
42
43     /**
44      * Normative prefix to use when importing {@link #RFC6241_SOURCE}.
45      */
46     public static final String MODULE_PREFIX = "nc";
47
48     private NetconfConstants() {
49         // Hidden on purpose
50     }
51
52     /**
53      * Return identifiers of all sources known to define NACM extension.
54      *
55      * @return Collection of identifiers.
56      */
57     public static Collection<SourceIdentifier> knownModelSources() {
58         return ImmutableList.of(RFC6241_SOURCE);
59     }
60 }