Remove RevisionSourceIdentifier
[yangtools.git] / model / odlext-model-api / src / main / java / org / opendaylight / yangtools / odlext / model / api / OpenDaylightExtensionsConstants.java
1 /*
2  * Copyright (c) 2017 Pantheon Technologies, 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.odlext.model.api;
9
10 import com.google.common.collect.ImmutableList;
11 import java.util.Collection;
12 import org.opendaylight.yangtools.yang.common.QNameModule;
13 import org.opendaylight.yangtools.yang.common.Revision;
14 import org.opendaylight.yangtools.yang.common.UnresolvedQName.Unqualified;
15 import org.opendaylight.yangtools.yang.common.XMLNamespace;
16 import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier;
17
18 /**
19  * Constants associated with OpenDaylight extension in yang-ext.yang.
20  *
21  * @author Robert Varga
22  */
23 public final class OpenDaylightExtensionsConstants {
24     private static final Unqualified MODULE_NAME = Unqualified.of("yang-ext").intern();
25     private static final XMLNamespace MODULE_NAMESPACE =
26         XMLNamespace.of("urn:opendaylight:yang:extension:yang-ext").intern();
27     private static final Revision ORIGINAL_REVISION = Revision.of("2013-07-09");
28
29     /**
30      * Runtime baseline identity.
31      */
32     public static final QNameModule ORIGINAL_MODULE = QNameModule.create(MODULE_NAMESPACE, ORIGINAL_REVISION).intern();
33
34     /**
35      * Baseline model source name.
36      */
37     public static final SourceIdentifier ORIGINAL_SOURCE = new SourceIdentifier(MODULE_NAME, ORIGINAL_REVISION);
38
39     private OpenDaylightExtensionsConstants() {
40         // Hidden on purpose
41     }
42
43     /**
44      * Return identifiers of all sources known to define the metadata extension.
45      *
46      * @return Collection of identifiers.
47      */
48     public static Collection<SourceIdentifier> knownModelSources() {
49         return ImmutableList.of(ORIGINAL_SOURCE);
50     }
51 }