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%2FDataNodeContainerBuilder.java;fp=yang%2Fyang-parser-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fyangtools%2Fyang%2Fparser%2Fbuilder%2Fapi%2FDataNodeContainerBuilder.java;h=0f94b8609f2e11b53e4da5bc296db746574997fa;hb=5c1f875f69e35248aa4115c429bd962160beeef4;hp=0000000000000000000000000000000000000000;hpb=80562b826a79ad9a832be902427e54359df7725b;p=yangtools.git diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/builder/api/DataNodeContainerBuilder.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/builder/api/DataNodeContainerBuilder.java new file mode 100644 index 0000000000..0f94b8609f --- /dev/null +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/builder/api/DataNodeContainerBuilder.java @@ -0,0 +1,109 @@ +/* + * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ +package org.opendaylight.yangtools.yang.parser.builder.api; + +import java.util.Set; + +import org.opendaylight.yangtools.yang.common.QName; +import org.opendaylight.yangtools.yang.model.api.DataSchemaNode; +import org.opendaylight.yangtools.yang.model.api.GroupingDefinition; +import org.opendaylight.yangtools.yang.model.api.SchemaPath; + +/** + * Interface for all yang data-node containers [augment, case, container, + * grouping, list, module, notification]. + */ +public interface DataNodeContainerBuilder extends Builder { + + /** + * Get qname of this node. + * + * @return QName of this node + */ + QName getQName(); + + /** + * Get schema path of this node. + * + * @return SchemaPath of this node + */ + SchemaPath getPath(); + + /** + * Get already built child nodes. + * + * @return collection of child nodes + */ + Set getChildNodes(); + + /** + * Get builders of child nodes. + * + * @return collection child nodes builders + */ + Set getChildNodeBuilders(); + + /** + * Get child node by name. + * + * @param name + * name of child to seek + * @return child node with given name if present, null otherwise + */ + DataSchemaNodeBuilder getDataChildByName(String name); + + /** + * Add builder of child node to this node. + * + * @param childNode + */ + void addChildNode(DataSchemaNodeBuilder childNode); + + /** + * Get already built groupings defined in this node. + * + * @return collection of GroupingDefinition objects + */ + Set getGroupings(); + + /** + * Get builders of groupings defined in this node. + * + * @return collection of grouping builders + */ + Set getGroupingBuilders(); + + /** + * Add builder of grouping statement to this node. + * + * @param groupingBuilder + */ + void addGrouping(GroupingBuilder groupingBuilder); + + /** + * Add builder of uses statement to this node. + * + * @param usesBuilder + */ + void addUsesNode(UsesNodeBuilder usesBuilder); + + /** + * Get builders of typedef statement defined in this node. + * + * @return + */ + Set getTypeDefinitionBuilders(); + + /** + * Add typedef builder to this node. + * + * @param typedefBuilder + */ + void addTypedef(TypeDefinitionBuilder typedefBuilder); + +}