blob: 7aae900f489da10296827072f3fbfc0c5a639d49 [file] [log] [blame]
Vinod Kumar S2ff139c2016-02-16 01:37:16 +05301/*
2 * Copyright 2016 Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package org.onosproject.yangutils.datamodel;
18
19import java.util.HashSet;
20import java.util.Set;
21
22import org.onosproject.yangutils.datamodel.exceptions.DataModelException;
23import org.onosproject.yangutils.parser.Parsable;
24import org.onosproject.yangutils.parser.ParsableDataType;
Bharat saraswal594bc6d2016-02-22 22:15:21 +053025import org.onosproject.yangutils.translator.CachedFileHandle;
Vinod Kumar S2ff139c2016-02-16 01:37:16 +053026
27/*
28 * The enumeration built-in type represents values from a set of
29 * assigned names.
30 */
31
32/**
33 * Maintains the enumeration data type information.
34 */
35public class YangEnumeration extends YangNode implements Parsable {
36
37 /**
38 * Enumeration info set.
39 */
40 private Set<YangEnum> enumSet;
41
42 /**
43 * Create an enumeration object.
44 */
45 public YangEnumeration() {
46 super(YangNodeType.ENUMERATION_NODE);
47 setEnumSet(new HashSet<YangEnum>());
48
49 }
50
51 /**
52 * Get the ENUM set.
53 *
54 * @return the ENUM set
55 */
56 public Set<YangEnum> getEnumSet() {
57 return enumSet;
58 }
59
60 /**
61 * Set the ENUM set.
62 *
63 * @param enumSet the ENUM set to set
64 */
65 private void setEnumSet(Set<YangEnum> enumSet) {
66 this.enumSet = enumSet;
67 }
68
69 /**
70 * Add ENUM value.
71 *
72 * @param enumInfo the ENUM value of string
73 */
74 public void addEnumInfo(YangEnum enumInfo) {
75
76 }
77
78 /**
79 * Returns the type of the data.
80 *
81 * @return returns ENUMERATION_DATA
82 */
Bharat saraswal594bc6d2016-02-22 22:15:21 +053083 @Override
Vinod Kumar S2ff139c2016-02-16 01:37:16 +053084 public ParsableDataType getParsableDataType() {
85 return ParsableDataType.ENUMERATION_DATA;
86 }
87
88 /**
89 * Validate the data on entering the corresponding parse tree node.
90 *
91 * @throws DataModelException a violation of data model rules.
92 */
Bharat saraswal594bc6d2016-02-22 22:15:21 +053093 @Override
Vinod Kumar S2ff139c2016-02-16 01:37:16 +053094 public void validateDataOnEntry() throws DataModelException {
95 // TODO auto-generated method stub, to be implemented by parser
96 }
97
98 /**
99 * Validate the data on exiting the corresponding parse tree node.
100 *
101 * @throws DataModelException a violation of data model rules.
102 */
Bharat saraswal594bc6d2016-02-22 22:15:21 +0530103 @Override
Vinod Kumar S2ff139c2016-02-16 01:37:16 +0530104 public void validateDataOnExit() throws DataModelException {
105 // TODO auto-generated method stub, to be implemented by parser
106 }
107
108 /* (non-Javadoc)
109 * @see org.onosproject.yangutils.datamodel.YangNode#getName()
110 */
111 @Override
112 public String getName() {
113 // TODO Auto-generated method stub
114 return null;
115 }
116
117 /* (non-Javadoc)
118 * @see org.onosproject.yangutils.datamodel.YangNode#setName(java.lang.String)
119 */
120 @Override
121 public void setName(String name) {
122 // TODO Auto-generated method stub
123
124 }
125
126 /* (non-Javadoc)
127 * @see org.onosproject.yangutils.datamodel.YangNode#getPackage()
128 */
129 @Override
130 public String getPackage() {
131 // TODO Auto-generated method stub
132 return null;
133 }
134
135 /* (non-Javadoc)
136 * @see org.onosproject.yangutils.datamodel.YangNode#setPackage(java.lang.String)
137 */
138 @Override
139 public void setPackage(String pkg) {
140 // TODO Auto-generated method stub
141
142 }
143
144 /* (non-Javadoc)
145 * @see org.onosproject.yangutils.translator.CodeGenerator#generateJavaCodeEntry()
146 */
Bharat saraswal594bc6d2016-02-22 22:15:21 +0530147 @Override
Vinod Kumar S2ff139c2016-02-16 01:37:16 +0530148 public void generateJavaCodeEntry() {
149 // TODO Auto-generated method stub
150
151 }
152
153 /* (non-Javadoc)
154 * @see org.onosproject.yangutils.translator.CodeGenerator#generateJavaCodeExit()
155 */
Bharat saraswal594bc6d2016-02-22 22:15:21 +0530156 @Override
Vinod Kumar S2ff139c2016-02-16 01:37:16 +0530157 public void generateJavaCodeExit() {
158 // TODO Auto-generated method stub
159
160 }
Bharat saraswal594bc6d2016-02-22 22:15:21 +0530161
162 @Override
163 public CachedFileHandle getFileHandle() {
164 // TODO Auto-generated method stub
165 return null;
166 }
167
168 @Override
169 public void setFileHandle(CachedFileHandle fileHandle) {
170 // TODO Auto-generated method stub
171
172 }
Vinod Kumar S2ff139c2016-02-16 01:37:16 +0530173}