Implemented refine statement parsing.
[controller.git] / opendaylight / sal / yang-prototype / code-generator / yang-model-parser-impl / src / main / java / org / opendaylight / controller / yang / model / parser / util / RefineHolder.java
1 /*
2  * Copyright (c) 2013 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 package org.opendaylight.controller.yang.model.parser.util;
9
10 import org.opendaylight.controller.yang.model.api.MustDefinition;
11
12 public final class RefineHolder {
13     private final String name;
14     private Refine type;
15     private String defaultStr;
16     private String description;
17     private String reference;
18     private Boolean config;
19     private Boolean mandatory;
20     private Boolean presence;
21     private MustDefinition must;
22     private Integer minElements;
23     private Integer maxElements;
24
25     public RefineHolder(final String name) {
26         this.name = name;
27     }
28
29     public Refine getType() {
30         return type;
31     }
32
33     public void setType(final Refine type) {
34         this.type = type;
35     }
36
37     public String getDefaultStr() {
38         return defaultStr;
39     }
40
41     public void setDefaultStr(final String defaultStr) {
42         this.defaultStr = defaultStr;
43     }
44
45     public String getDescription() {
46         return description;
47     }
48
49     public void setDescription(final String description) {
50         this.description = description;
51     }
52
53     public String getReference() {
54         return reference;
55     }
56
57     public void setReference(final String reference) {
58         this.reference = reference;
59     }
60
61     public Boolean isConfig() {
62         return config;
63     }
64
65     public void setConfig(final Boolean config) {
66         this.config = config;
67     }
68
69     public Boolean isMandatory() {
70         return mandatory;
71     }
72
73     public void setMandatory(Boolean mandatory) {
74         this.mandatory = mandatory;
75     }
76
77     public Boolean isPresence() {
78         return presence;
79     }
80
81     public void setPresence(Boolean presence) {
82         this.presence = presence;
83     }
84
85     public MustDefinition getMust() {
86         return must;
87     }
88
89     public void setMust(MustDefinition must) {
90         this.must = must;
91     }
92
93     public Integer getMinElements() {
94         return minElements;
95     }
96
97     public void setMinElements(Integer minElements) {
98         this.minElements = minElements;
99     }
100
101     public Integer getMaxElements() {
102         return maxElements;
103     }
104
105     public void setMaxElements(Integer maxElements) {
106         this.maxElements = maxElements;
107     }
108
109     public String getName() {
110         return name;
111     }
112
113     public enum Refine {
114         CONTAINER, LEAF, LIST, LEAF_LIST, CHOICE, ANYXML
115     }
116
117 }