2 * Copyright (c) 2017 Pantheon Technologies, 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.rfc8040.model.api;
10 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.model.repo.api.RevisionSourceIdentifier;
17 import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier;
20 * Constants associated with RFC8040.
22 * @author Robert Varga
25 public final class YangDataConstants {
26 private static final String MODULE_NAME = "ietf-restconf";
27 private static final URI MODULE_NAMESPACE = URI.create("urn:ietf:params:xml:ns:yang:ietf-restconf");
28 private static final Revision RFC8040_REVISION = Revision.of("2017-01-26");
31 * Runtime RFC8040 identity.
33 public static final QNameModule RFC8040_MODULE = QNameModule.create(MODULE_NAMESPACE, RFC8040_REVISION).intern();
36 * RFC8040 model source name.
38 public static final SourceIdentifier RFC8040_SOURCE = RevisionSourceIdentifier.create(MODULE_NAME,
42 * Normative prefix to use when importing {@link #RFC8040_SOURCE}.
44 public static final String MODULE_PREFIX = "rc";
46 private YangDataConstants() {
51 * Return identifiers of all sources known to define the metadata extension.
53 * @return Collection of identifiers.
55 public static Collection<SourceIdentifier> knownModelSources() {
56 return ImmutableList.of(RFC8040_SOURCE);