gpt4 book ai didi

org.onosproject.yangutils.datamodel.YangAugment类的使用及代码示例

转载 作者:知者 更新时间:2024-03-19 12:43:31 26 4
gpt4 key购买 nike

本文整理了Java中org.onosproject.yangutils.datamodel.YangAugment类的一些代码示例,展示了YangAugment类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YangAugment类的具体详情如下:
包路径:org.onosproject.yangutils.datamodel.YangAugment
类名称:YangAugment

YangAugment介绍

[英]Representation of data model node to maintain information defined in YANG augment.
[中]表示数据模型节点,以维护YANG augment中定义的信息。

代码示例

代码示例来源:origin: org.onosproject/onos-yang-datamodel

@Override
public void detectSelfCollision(String identifierName,
                YangConstructType dataType)
    throws DataModelException {
  if (getName().equals(identifierName)) {
    throw new DataModelException(
        "YANG file error: Duplicate input identifier detected, " +
            "same as input \"" +
            getName() + " in " +
            getLineNumber() + " at " +
            getCharPosition() +
            " in " + getFileName() + "\"");
  }
}

代码示例来源:origin: org.onosproject/onos-yang-datamodel

@Override
public void addIfFeatureList(YangIfFeature ifFeature) {
  if (getIfFeatureList() == null) {
    setIfFeatureList(new LinkedList<>());
  }
  getIfFeatureList().add(ifFeature);
}

代码示例来源:origin: org.onosproject/onos-yang-datamodel

/**
 * Adds a leaf.
 *
 * @param leaf the leaf to be added
 */
@Override
public void addLeaf(YangLeaf leaf) {
  getListOfLeaf().add(leaf);
}

代码示例来源:origin: org.onosproject/onos-yang-datamodel

@Override
public void setNameSpaceAndAddToParentSchemaMap() {
  // Get parent namespace and set namespace for self node.
  setNameSpace(getParent().getNameSpace());
  /*
   * Check if node contains leaf/leaf-list, if yes add namespace for leaf
   * and leaf list.
   */
  setLeafNameSpaceAndAddToParentSchemaMap();
}

代码示例来源:origin: org.onosproject/onos-yang-datamodel

@Override
public void setLeafNameSpaceAndAddToParentSchemaMap() {
  // Add namespace for all leafs.
  for (YangLeaf yangLeaf : getListOfLeaf()) {
    yangLeaf.setLeafNameSpaceAndAddToParentSchemaMap(getNameSpace());
  }
  // Add namespace for all leaf list.
  for (YangLeafList yangLeafList : getListOfLeafList()) {
    yangLeafList
        .setLeafNameSpaceAndAddToParentSchemaMap(getNameSpace());
  }
}

代码示例来源:origin: org.onosproject/onos-yang-datamodel

@Override
public void addToChildSchemaMap(
    YangSchemaNodeIdentifier schemaNodeIdentifier,
    YangSchemaNodeContextInfo yangSchemaNodeContextInfo)
    throws DataModelException {
  getYsnContextInfoMap()
      .put(schemaNodeIdentifier, yangSchemaNodeContextInfo);
  YangSchemaNodeContextInfo yangSchemaNodeContextInfo1 =
      new YangSchemaNodeContextInfo();
  yangSchemaNodeContextInfo1
      .setSchemaNode(yangSchemaNodeContextInfo.getSchemaNode());
  yangSchemaNodeContextInfo1.setContextSwitchedNode(this);
  getAugmentedNode().addToChildSchemaMap(schemaNodeIdentifier,
                      yangSchemaNodeContextInfo1);
}

代码示例来源:origin: org.onosproject/onos-yang-datamodel

/**
 * Adds a leaf-list.
 *
 * @param leafList the leaf-list to be added
 */
@Override
public void addLeafList(YangLeafList leafList) {
  getListOfLeafList().add(leafList);
}

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com