Add RFC6643 parser support
[yangtools.git] / yang / rfc6643-model-api / src / main / java / org / opendaylight / yangtools / rfc6643 / model / api / IetfYangSmiv2Constants.java
1 /*
2  * Copyright (c) 2020 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.rfc6643.model.api;
9
10 import com.google.common.annotations.Beta;
11 import com.google.common.collect.ImmutableList;
12 import java.net.URI;
13 import java.util.Collection;
14 import org.opendaylight.yangtools.yang.common.QNameModule;
15 import org.opendaylight.yangtools.yang.common.Revision;
16 import org.opendaylight.yangtools.yang.model.repo.api.RevisionSourceIdentifier;
17 import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier;
18
19 @Beta
20 public final class IetfYangSmiv2Constants {
21     private static final String MODULE_NAME = "ietf-yang-smiv2";
22     private static final URI MODULE_NAMESPACE = URI.create("urn:ietf:params:xml:ns:yang:ietf-yang-smiv2");
23     private static final Revision RFC6643_REVISION = Revision.of("2012-06-22");
24
25     /**
26      * Runtime RFC6643 identity.
27      */
28     public static final QNameModule RFC6643_MODULE = QNameModule.create(MODULE_NAMESPACE, RFC6643_REVISION).intern();
29
30     /**
31      * RFC6643 model source name.
32      */
33     public static final SourceIdentifier RFC6643_SOURCE = RevisionSourceIdentifier.create(MODULE_NAME,
34         RFC6643_REVISION);
35
36     /**
37      * Normative prefix to use when importing {@link #RFC6643_SOURCE}.
38      */
39     public static final String MODULE_PREFIX = "smiv2";
40
41     /**
42      * Return identifiers of all sources known to define NACM extension.
43      *
44      * @return Collection of identifiers.
45      */
46     public static Collection<SourceIdentifier> knownModelSources() {
47         return ImmutableList.of(RFC6643_SOURCE);
48     }
49
50     private IetfYangSmiv2Constants() {
51         // Hidden on purpose
52     }
53 }