gpt4 book ai didi

org.onosproject.yang.compiler.datamodel.YangNode.getNodeType()方法的使用及代码示例

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

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

YangNode.getNodeType介绍

[英]Returns the node type.
[中]返回节点类型。

代码示例

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

oldNode = value.get(0);
if (value.size() >= 2) {
  if (!node.getNodeType().equals(oldNode.getNodeType())) {
    oldNode = value.get(1);
if (oldNode.getNodeType().equals(node.getNodeType())) {
  throw new DataModelException(composeErrorMsg(node, oldNode));

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

/**
 * Adds namespace for self, next sibling and first child. This is used
 * after obtaining namespace in case of submodule after performing
 * linking.
 */
public void setNameSpaceAndAddToParentSchemaMap() {
  // Get parent namespace.
  if (getParent() != null && getParent().getNodeType() != ANYDATA_NODE) {
    // Get parent namespace and set namespace for self node.
    setNameSpace(getParent().getNameSpace());
    // Process addition of leaf to the child schema map of parent.
    processAdditionOfSchemaNodeToParentMap(getName(), getNameSpace());
  } else if (getParent() != null && getParent().getNodeType() == ANYDATA_NODE) {
    processAdditionOfSchemaNodeToParentMap(getName(), getNameSpace());
  } else {
    // Module/Sub-module
    setNameSpace((YangNamespace) this);
  }
  /*
   * Check if node contains leaf/leaf-list, if yes add namespace for leaf
   * and leaf list.
   */
  if (this instanceof YangLeavesHolder) {
    ((YangLeavesHolder) this).setLeafNameSpaceAndAddToParentSchemaMap();
  }
}

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

private void resolveUsesAugment(T entity, YangNode node) {
  YangXpathLinker<T> linker = new YangXpathLinker<T>();
  YangAugment aug = (YangAugment) entity;
  YangNode tgt = linker.processUsesAugLinking(aug.getTargetNode(),
                        (YangUses) node);
  if (tgt != null) {
    if (tgt instanceof YangAugmentableNode) {
      //TODO: collision detection
      ((YangAugmentableNode) tgt).addAugmentation(aug);
      aug.setAugmentedNode(tgt);
      setAugmentedFlagInAncestors(tgt);
      Resolvable resolvable = (Resolvable) entity;
      resolvable.setResolvableStatus(RESOLVED);
      if (tgt instanceof YangInput) {
        linker.addInModuleIfInput(aug, node);
      }
    } else {
      throw new LinkerException(getErrorMsg(
          INVALID_TARGET + tgt.getNodeType(),
          aug.getName(), aug.getLineNumber(),
          aug.getCharPosition(), aug.getFileName()));
    }
  }
}

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

INVALID_TARGET + targetNode.getNodeType(),
      augment.getName(), augment.getLineNumber(),
      augment.getCharPosition(), augment.getFileName()));
} else {
  throw new LinkerException(getErrorMsg(
      INVALID_TARGET + targetNode.getNodeType(), ca.getPath(),
      ca.getLineNumber(), ca.getCharPosition(), ca.getFileName()));

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

throws DataModelException {
if (newSibling.getNodeType() == null) {
  throw new DataModelException("Cloned abstract node cannot be " +
                     "inserted into a tree "

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

if (newChild.getNodeType() == null) {
  throw new DataModelException("Abstract node cannot be inserted " +
                     "into a tree " + getName() +

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