Binding2: Added concepts.
[mdsal.git] / binding2 / mdsal-binding2-spec / src / main / java / org / opendaylight / mdsal / binding2 / spec / BindingNamespaceType.java
1 /*
2  * Copyright (c) 2016 Cisco Systems, Inc. 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
9 package org.opendaylight.mdsal.binding2.spec;
10
11 import com.google.common.annotations.Beta;
12 import com.google.common.base.Preconditions;
13
14 /**
15  * Binding Namespace is structure of Java packages designed to prevent conflicts in YANG Java
16  * Binding, since Java does have only one namespace.
17  *
18  *
19  */
20 @Beta
21 public enum BindingNamespaceType {
22
23     /**
24      *
25      * Namespace containing all derived types, defined from grouping and data namespaces
26      *
27      */
28     Typedef("type"), Identity("ident"), Key("key"), Data("data"), Grouping("grp"), Builder("dto"),;
29
30     private final String packagePrefix;
31
32     private BindingNamespaceType(String packagePrefix) {
33         this.packagePrefix = Preconditions.checkNotNull(packagePrefix);
34     }
35
36     public String getPackagePrefix() {
37         return packagePrefix;
38     }
39 }