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.
21 public interface RefineBuilder extends DocumentedNodeBuilder {
24 * Get value of config statement.
26 * @return value of config statement
28 Boolean isConfiguration();
31 * Set config statement to the product.
34 * @param config true if config true was set, false if config false was set.
36 void setConfiguration(Boolean config);
39 * Returns mandatory state of node or NULL if state was not refined.
42 * @return mandatory state of node or NULL if state was not refined.
44 Boolean isMandatory();
46 void setMandatory(Boolean mandatory);
50 * Returns presence state of refined container.
52 * @return Presence state of refined container.
56 void setPresence(Boolean presence);
59 * Returns <code>must</code> definition associated with this builder.
61 * @return <code>must</code> definition associated with this builder.
63 MustDefinition getMust();
66 * Adds must definition to product of this builder.
68 * @param must <code>must</code> definition which should be associated with parent node.
70 void setMust(MustDefinition must);
75 * Returns number of minimum required elements or NULL if minimum elements was not overriden.
77 * This constraint has meaning only if associated node is list or leaf-list.
79 * @return number of minimum required elements.
81 Integer getMinElements();
85 * Sets number of minimum required elements.
87 * This constraint has meaning only if associated node is list or leaf-list.
90 * number of minimum required elements.
92 void setMinElements(Integer minElements);
96 * Returns number of maximum elements or NULL if maximum elements was not overriden.
98 * This constraint has meaning only if associated node is list or leaf-list.
100 * @return number of maximum required elements.
102 Integer getMaxElements();
106 * Sets number of maximum required elements.
108 * This constraint has meaning only if associated node is list or leaf-list.
110 * @param maxElements number of maximum required elements.
112 void setMaxElements(Integer maxElements);
116 * Returns string representation of path to refine target, which is relative to grouping root
118 * This string representation does not need to contain prefixes, since parent uses
119 * element introduces elements with namespace local to parent module.
121 * @return string representation of path to refine target, which is relative to grouping root
123 String getTargetPathString();
127 * Returns module (source) name in which refine statement was defined.
129 * @return module (source) name in which refine statement was defined.
131 String getModuleName();
134 * Line on which element was defined.
136 * @return Line on which element was defined.
141 * Returns list of unknown schema node builders, which are associated
142 * with refine statement.
144 * @return Set of unknown schema node builders.
146 List<UnknownSchemaNodeBuilder> getUnknownNodes();
149 * Returns string representation of default value or null, if default value was not refined.
151 * @return string representation of default value or null, if default value was not refined.
153 String getDefaultStr();