2 * Copyright (c) 2013 Cisco Systems, Inc. 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.controller.yang.parser.util;
10 import java.util.ArrayList;
11 import java.util.List;
13 import org.opendaylight.controller.yang.model.api.MustDefinition;
14 import org.opendaylight.controller.yang.parser.builder.api.Builder;
15 import org.opendaylight.controller.yang.parser.builder.impl.UnknownSchemaNodeBuilder;
17 public final class RefineHolder implements Builder {
18 private final String name;
19 private final int line;
20 private String defaultStr;
21 private String description;
22 private String reference;
23 private Boolean config;
24 private Boolean mandatory;
25 private Boolean presence;
26 private MustDefinition must;
27 private Integer minElements;
28 private Integer maxElements;
29 private final List<UnknownSchemaNodeBuilder> addedUnknownNodes = new ArrayList<UnknownSchemaNodeBuilder>();
31 public RefineHolder(final String name, final int line) {
37 public int getLine() {
41 public String getDefaultStr() {
45 public void setDefaultStr(final String defaultStr) {
46 this.defaultStr = defaultStr;
49 public String getDescription() {
53 public void setDescription(final String description) {
54 this.description = description;
57 public String getReference() {
61 public void setReference(final String reference) {
62 this.reference = reference;
65 public Boolean isConfig() {
69 public void setConfig(final Boolean config) {
73 public Boolean isMandatory() {
77 public void setMandatory(Boolean mandatory) {
78 this.mandatory = mandatory;
81 public Boolean isPresence() {
85 public void setPresence(Boolean presence) {
86 this.presence = presence;
89 public MustDefinition getMust() {
93 public void setMust(MustDefinition must) {
97 public Integer getMinElements() {
101 public void setMinElements(Integer minElements) {
102 this.minElements = minElements;
105 public Integer getMaxElements() {
109 public void setMaxElements(Integer maxElements) {
110 this.maxElements = maxElements;
113 public String getName() {
117 public List<UnknownSchemaNodeBuilder> getUnknownNodes() {
118 return addedUnknownNodes;
121 public void addUnknownSchemaNode(UnknownSchemaNodeBuilder unknownNode) {
122 addedUnknownNodes.add(unknownNode);
126 public Object build() {