本文整理了Java中org.onosproject.yang.compiler.datamodel.YangSchemaNode
类的一些代码示例,展示了YangSchemaNode
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YangSchemaNode
类的具体详情如下:
包路径:org.onosproject.yang.compiler.datamodel.YangSchemaNode
类名称:YangSchemaNode
[英]Abstraction of YANG data node, used by YMS to abstractly refer the data nodes in YANG data tree.
[中]YANG数据节点的抽象,由YMS用于抽象地引用YANG数据树中的数据节点。
代码示例来源:origin: org.onosproject/onos-yang-runtime-uils
/**
* Returns schema node's generated interface class name.
*
* @param schemaNode schema node
* @return schema node's generated interface class name
*/
public static String getInterfaceClassName(YangSchemaNode schemaNode) {
return schemaNode.getJavaPackage() + PERIOD +
getCapitalCase(schemaNode.getJavaClassNameOrBuiltInType());
}
代码示例来源: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;
}
}
代码示例来源:origin: org.onosproject/onos-yang-compiler-linker
/**
* Removes deviation target node from cloned data model.
*
* @param target deviation target node
* @param targetPath deviation target's last node
*/
private void resolveDeviationNotSupported(YangSchemaNode target,
YangAtomicPath targetPath) {
if (target.getName().equals(targetPath.getNodeIdentifier().getName())) {
deleteUnsupportedNodeFromTree((YangNode) target);
} else {
deleteUnsupportedLeafOrLeafList((YangLeavesHolder) target,
targetPath.getNodeIdentifier().getName());
}
}
代码示例来源:origin: org.onosproject/onos-yang-compiler-linker
/**
* Adds deviate add sub-statements to deviation target node.
*
* @param deviateAddList list of deviate add
* @param target deviation target node
* @param targetPath deviation target's last node
* @throws DataModelException if there is a data model error
*/
private void resolveDeviateAdd(List<YangDeviateAdd> deviateAddList,
YangSchemaNode target,
YangAtomicPath targetPath)
throws DataModelException {
for (YangDeviateAdd deviate : deviateAddList) {
if (target.getName().equals(targetPath.getNodeIdentifier().getName())) {
updateDeviateAddToTargetNode(target, deviate);
} else {
YangSchemaNode leaf = findLeafNode((YangLeavesHolder) target, targetPath
.getNodeIdentifier().getName());
updateDeviateAddToTargetNode(leaf, deviate);
}
}
}
代码示例来源:origin: org.onosproject/onos-yang-compiler-linker
/**
* Replaces deviate replace sub-statements from deviation target node.
*
* @param deviateReplaceList list of deviate replace
* @param target deviation target node
* @param targetPath deviation target's last node
* @throws DataModelException if there is a data model error
*/
private void resolveDeviateReplace(List<YangDeviateReplace>
deviateReplaceList,
YangSchemaNode target,
YangAtomicPath targetPath)
throws DataModelException {
for (YangDeviateReplace deviate : deviateReplaceList) {
if (target.getName().equals(targetPath.getNodeIdentifier().getName())) {
updateDeviateReplaceToTargetNode(target, deviate);
} else {
YangSchemaNode leaf = findLeafNode((YangLeavesHolder) target, targetPath
.getNodeIdentifier().getName());
updateDeviateReplaceToTargetNode(leaf, deviate);
}
}
}
代码示例来源:origin: org.onosproject/onos-yang-compiler-linker
/**
* Removes deviate delete sub-statements from deviation target node.
*
* @param deviateDeleteList list of deviate delete
* @param target deviation target node
* @param targetPath deviation target's last node
* @throws DataModelException if there is a data model error
*/
private void resolveDeviateDelete(List<YangDeviateDelete>
deviateDeleteList,
YangSchemaNode target,
YangAtomicPath targetPath)
throws DataModelException {
for (YangDeviateDelete deviate : deviateDeleteList) {
if (target.getName().equals(targetPath.getNodeIdentifier().getName())) {
updateDeviateDeleteToTargetNode(target, deviate);
} else {
YangSchemaNode leaf = findLeafNode((YangLeavesHolder) target, targetPath
.getNodeIdentifier().getName());
updateDeviateDeleteToTargetNode(leaf, deviate);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!