X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=yang%2Fyang-parser-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fyangtools%2Fyang%2Fparser%2Fbuilder%2Fapi%2FUsesNodeBuilder.java;h=aedeef3ccbb47ecfc43498171d5d31655906f12d;hb=42abb28b99a02f9580f4676ce5c315628e5bcd24;hp=f27af6e0cb5dd4215d349a8e4123bc06b64bcdb1;hpb=f75b7abb9dcc2ba02a14a316212da1c1b434a9b3;p=yangtools.git diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/builder/api/UsesNodeBuilder.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/builder/api/UsesNodeBuilder.java index f27af6e0cb..aedeef3ccb 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/builder/api/UsesNodeBuilder.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/builder/api/UsesNodeBuilder.java @@ -9,32 +9,32 @@ package org.opendaylight.yangtools.yang.parser.builder.api; 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. @@ -84,29 +84,10 @@ public interface UsesNodeBuilder extends GroupingMember, Builder { /** * 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. - *

- * 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. - *

- * - * @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. * @@ -127,7 +108,7 @@ public interface UsesNodeBuilder extends GroupingMember, Builder { * * @return list of RefineHolder objects */ - List getRefines(); + List getRefines(); /** * Get refined nodes. @@ -142,7 +123,7 @@ public interface UsesNodeBuilder extends GroupingMember, Builder { * @param refine * new RefineHolder object */ - void addRefine(RefineHolder refine); + void addRefine(RefineBuilder refine); /** * Add refine node. @@ -154,56 +135,33 @@ public interface UsesNodeBuilder extends GroupingMember, Builder { /** * Build new UsesNode object. - */ - UsesNode build(YangNode parent); - - /** - * Get child nodes defined in target grouping. * - * @return set of DataSchemaNodeBuilder objects - */ - Set getTargetChildren(); - - /** - * Get groupings defined in target grouping. * - * @return set of GroupingBuilder objects + * @return UsesNode Instance of {@link UsesNode} described by this builder. */ - Set getTargetGroupings(); + @Override + UsesNode build(); /** - * Get type definitions defined in target grouping. * - * @return set of typedefs defined in target grouping - */ - Set 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 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); + @Deprecated + void setResolved(boolean resolved); }