import java.util.List;
import java.util.Set;
-
import org.opendaylight.yangtools.yang.model.api.GroupingDefinition;
import org.opendaylight.yangtools.yang.model.api.SchemaPath;
import org.opendaylight.yangtools.yang.model.api.UsesNode;
-import org.opendaylight.yangtools.yang.parser.builder.impl.UnknownSchemaNodeBuilder;
-import org.opendaylight.yangtools.yang.parser.util.RefineHolder;
/**
- * Interface for builders of 'uses' statement.
+ * Builder for 'uses' statement.
+ *
+ * @deprecated Pre-Beryllium implementation, scheduled for removal.
*/
-public interface UsesNodeBuilder extends GroupingMember, Builder {
+@Deprecated
+public interface UsesNodeBuilder extends GroupingMember {
/**
* Get parent of this uses node. Since uses can be defined only under on of
* module, container, list, case, grouping, input, output, notification or
* augment, return type is DataNodeContainerBuilder.
*/
+ @Override
DataNodeContainerBuilder getParent();
/**
- * Get grouping path as string.
+ * Get target grouping path.
*
- * @return grouping path as String
+ * @return target grouping path
*/
- String getGroupingPathAsString();
+ SchemaPath getTargetGroupingPath();
/**
* Get grouping path.
*/
void setGrouping(GroupingBuilder grouping);
+ /**
+ * Get information if this uses node is defined in augment.
+ *
+ * @return true, if this node is defined under augment statement, false
+ * otherwise
+ */
+ boolean isAugmenting();
+
+ /**
+ * Set information if this uses node is defined in augment.
+ *
+ * @param augmenting information about augmentation
+ */
+ void setAugmenting(boolean augmenting);
+
/**
* Get augmentations defined in this uses node.
*
*
* @return list of RefineHolder objects
*/
- List<RefineHolder> getRefines();
+ List<RefineBuilder> getRefines();
/**
* Get refined nodes.
* @param refine
* new RefineHolder object
*/
- void addRefine(RefineHolder refine);
+ void addRefine(RefineBuilder refine);
/**
* Add refine node.
/**
* Build new UsesNode object.
- */
- UsesNode build();
-
- /**
- * Get child nodes defined in target grouping.
*
- * @return set of DataSchemaNodeBuilder objects
- */
- Set<DataSchemaNodeBuilder> getTargetChildren();
-
- /**
- * Set reference to target grouping child nodes.
*
- * @param targetChildren
- * set of child nodes defined in target grouping
+ * @return UsesNode Instance of {@link UsesNode} described by this builder.
*/
- void setTargetChildren(Set<DataSchemaNodeBuilder> targetChildren);
-
- /**
- * Get groupings defined in target grouping.
- *
- * @return set of GroupingBuilder objects
- */
- Set<GroupingBuilder> getTargetGroupings();
-
- /**
- * Set reference to target grouping groupings.
- *
- * @param targetGroupings
- * set of groupings defined in target grouping
- */
- void setTargetGroupings(Set<GroupingBuilder> targetGroupings);
-
- /**
- * Get type definitions defined in target grouping.
- *
- * @return set of typedefs defined in target grouping
- */
- Set<TypeDefinitionBuilder> getTargetTypedefs();
-
- /**
- * Set reference to target grouping typedefs.
- *
- * @param targetTypedefs
- * set of typedefs defined in target grouping
- */
- void setTargetTypedefs(Set<TypeDefinitionBuilder> targetTypedefs);
+ @Override
+ UsesNode build();
/**
- * Get unknown nodes defined in target grouping.
*
- * @return list of unknown nodes defined in target grouping
- */
- List<UnknownSchemaNodeBuilder> getTargetUnknownNodes();
-
- /**
- * Set reference to target grouping unknown nodes.
+ * Returns true if uses node was resolved and {@link #getGroupingBuilder()}
+ * was instantiated for parent done of this node.
*
- * @param targetUnknownNodes
- * list of unknown nodes defined in target grouping.
+ * @return true if uses node was resolved and associated nodes were instantiated in parent node.
*/
- void setTargetUnknownNodes(List<UnknownSchemaNodeBuilder> targetUnknownNodes);
+ boolean isResolved();
/**
*
- * @return true, if this object was built based on another UsesNodeBuilder,
- * false otherwise
- */
- boolean isCopy();
-
- /**
+ * Sets state of instantiation of {@link #getGroupingBuilder()}
+ * into parent node of this node.
*
- * @return true, if target grouping objects was loaded already, false
- * otherwise
- */
- boolean isDataCollected();
-
- /**
- * Set if target grouping objects was loaded already.
+ * @deprecated Do not use this, this should be internal to the implementation
+ * and public API contract.
*
- * @param dataCollected
+ * @param resolved resolved
*/
- void setDataCollected(boolean dataCollected);
+ @Deprecated
+ void setResolved(boolean resolved);
}