gpt4 book ai didi

org.onosproject.yang.compiler.datamodel.YangAnydata类的使用及代码示例

转载 作者:知者 更新时间:2024-03-19 10:45:31 27 4
gpt4 key购买 nike

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

YangAnydata介绍

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

代码示例

代码示例来源:origin: org.onosproject/onos-yang-compiler-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 container \"" +
            getName() + " in " +
            getLineNumber() + " at " +
            getCharPosition() +
            " in " + getFileName() + "\"");
  }
}

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

@Override
public void addToChildSchemaMap(YangSchemaNodeIdentifier schemaNodeIdentifier,
                YangSchemaNodeContextInfo yangSchemaNodeContextInfo) {
  getYsnContextInfoMap().put(schemaNodeIdentifier, yangSchemaNodeContextInfo);
}

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

anyData.setName(identifier);
anyData.setLineNumber(line);
anyData.setCharPosition(charPositionInLine);
anyData.setFileName(listener.getFileName());
  anyData.setConfig(parentConfig);

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

@Override
public SchemaContext getChildContext(SchemaId schemaId) {
  checkNotNull(schemaId, E_ID);
  YangSchemaNodeIdentifier id = getNodeIdFromSchemaId(
      schemaId, getNameSpace().getModuleNamespace());
  try {
    YangSchemaNode node = getChildSchema(id).getSchemaNode();
    if (node instanceof SchemaDataNode) {
      return node;
    } else {
      throw new IllegalArgumentException(errorMsg(FMT_NOT_EXIST,
                            schemaId.name(),
                            getName()));
    }
  } catch (DataModelException e) {
    throw new IllegalArgumentException(e.getMessage());
  }
}

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

@Override
  public YangSchemaNode addSchema(YangSchemaNode containedSchema) throws
      IllegalArgumentException {
    YangNode nodeToClone = (YangNode) containedSchema;
    try {
      cloneSubTree(nodeToClone.getParent(), this, null,
             false, nodeToClone);
    } catch (DataModelException e) {
      throw new IllegalArgumentException(e);
    }
    YangNode child = getChild();
    // Contained Schema Name
    String name = containedSchema.getName();
    while (child.getName() != name) {
      child = child.getNextSibling();
    }
    return child;
  }
}

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