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.model.api.YangNode;
-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.
/**
* Set information if this uses node is defined in augment.
*
- * @param augmenting
+ * @param augmenting information about augmentation
*/
void setAugmenting(boolean augmenting);
- /**
- * Get augment under which was this uses node was defined.
- * <p>
- * Note: This method may return different object than {@link #getParent()}
- * if this node is a copy of other uses node. If the uses node is copied,
- * its parent has changed, but parent augment is always same.
- * </p>
- *
- * @return AugmentationSchemaBuilder under which was this node defined
- */
- AugmentationSchemaBuilder getParentAugment();
-
- /**
- * Set augment under which was this uses node was defined.
- *
- * @param augment
- */
- void setParentAugment(AugmentationSchemaBuilder augment);
-
/**
* 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(YangNode parent);
-
- /**
- * Get child nodes defined in target grouping.
*
- * @return set of DataSchemaNodeBuilder objects
- */
- Set<DataSchemaNodeBuilder> getTargetChildren();
-
- /**
- * Get groupings defined in target grouping.
*
- * @return set of GroupingBuilder objects
+ * @return UsesNode Instance of {@link UsesNode} described by this builder.
*/
- Set<GroupingBuilder> getTargetGroupings();
+ @Override
+ UsesNode build();
/**
- * Get type definitions defined in target grouping.
*
- * @return set of typedefs defined in target grouping
- */
- Set<TypeDefinitionBuilder> getTargetTypedefs();
-
- /**
- * Get unknown nodes defined in target grouping.
+ * Returns true if uses node was resolved and {@link #getGroupingBuilder()}
+ * was instantiated for parent done of this node.
*
- * @return list of unknown nodes defined in target grouping
+ * @return true if uses node was resolved and associated nodes were instantiated in parent node.
*/
- List<UnknownSchemaNodeBuilder> getTargetUnknownNodes();
+ 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);
-
- boolean isResolved();
-
+ @Deprecated
void setResolved(boolean resolved);
}