2 * Copyright (c) 2014 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.yangtools.yang.parser.builder.api;
10 import java.util.List;
11 import org.opendaylight.yangtools.yang.model.api.MustDefinition;
14 * Mutable holder for information contained in <code>refine</code>
16 * Represents a local change to node introduced by uses statement
17 * e.g. change in documentation, configuration or properties.
19 * @deprecated Pre-Beryllium implementation, scheduled for removal.
22 public interface RefineBuilder extends DocumentedNodeBuilder {
25 * Get value of config statement.
27 * @return value of config statement
29 Boolean isConfiguration();
32 * Set config statement to the product.
35 * @param config true if config true was set, false if config false was set.
37 void setConfiguration(Boolean config);
40 * Returns mandatory state of node or NULL if state was not refined.
43 * @return mandatory state of node or NULL if state was not refined.
45 Boolean isMandatory();
47 void setMandatory(Boolean mandatory);
51 * Returns presence state of refined container.
53 * @return Presence state of refined container.
57 void setPresence(Boolean presence);
60 * Returns <code>must</code> definition associated with this builder.
62 * @return <code>must</code> definition associated with this builder.
64 MustDefinition getMust();
67 * Adds must definition to product of this builder.
69 * @param must <code>must</code> definition which should be associated with parent node.
71 void setMust(MustDefinition must);
76 * Returns number of minimum required elements or NULL if minimum elements was not overriden.
78 * This constraint has meaning only if associated node is list or leaf-list.
80 * @return number of minimum required elements.
82 Integer getMinElements();
86 * Sets number of minimum required elements.
88 * This constraint has meaning only if associated node is list or leaf-list.
91 * number of minimum required elements.
93 void setMinElements(Integer minElements);
97 * Returns number of maximum elements or NULL if maximum elements was not overriden.
99 * This constraint has meaning only if associated node is list or leaf-list.
101 * @return number of maximum required elements.
103 Integer getMaxElements();
107 * Sets number of maximum required elements.
109 * This constraint has meaning only if associated node is list or leaf-list.
111 * @param maxElements number of maximum required elements.
113 void setMaxElements(Integer maxElements);
117 * Returns string representation of path to refine target, which is relative to grouping root
119 * This string representation does not need to contain prefixes, since parent uses
120 * element introduces elements with namespace local to parent module.
122 * @return string representation of path to refine target, which is relative to grouping root
124 String getTargetPathString();
128 * Returns module (source) name in which refine statement was defined.
130 * @return module (source) name in which refine statement was defined.
132 String getModuleName();
135 * Line on which element was defined.
137 * @return Line on which element was defined.
142 * Returns list of unknown schema node builders, which are associated
143 * with refine statement.
145 * @return Set of unknown schema node builders.
147 List<UnknownSchemaNodeBuilder> getUnknownNodes();
150 * Returns string representation of default value or null, if default value was not refined.
152 * @return string representation of default value or null, if default value was not refined.
154 String getDefaultStr();