本文整理了Java中org.onosproject.yangutils.datamodel.YangNodeIdentifier.getName()
方法的一些代码示例,展示了YangNodeIdentifier.getName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YangNodeIdentifier.getName()
方法的具体详情如下:
包路径:org.onosproject.yangutils.datamodel.YangNodeIdentifier
类名称:YangNodeIdentifier
方法名:getName
[英]Returns name of the node identifier.
[中]返回节点标识符的名称。
代码示例来源:origin: org.onosproject/onos-yang-datamodel
@Override
public String getName() {
return nodeIdentifier.getName();
}
代码示例来源:origin: org.onosproject/onos-yang-datamodel
/**
* Returns the name of data type.
*
* @return the name of data type
*/
public String getDataTypeName() {
return nodeId.getName();
}
代码示例来源:origin: org.onosproject/onos-yang-datamodel
/**
* Returns the name of identity.
*
* @return the identity name
*/
@Override
public String getName() {
return baseIdentity.getName();
}
代码示例来源:origin: org.onosproject/onos-yang-utils-parser
/**
* Returns the node that matches with the name of the node in path.
*
* @param nodeInUnique node name in path
* @param potentialReferredNode node under which it has to match
* @return referred node
*/
private static YangNode getReferredNodeFromTheUniqueNodes(YangNodeIdentifier nodeInUnique, YangNode
potentialReferredNode) {
while (potentialReferredNode != null) {
// Check if the potential referred node is the actual referred node
if (potentialReferredNode.getName().equals(nodeInUnique.getName())) {
return potentialReferredNode;
}
potentialReferredNode = potentialReferredNode.getNextSibling();
}
return null;
}
代码示例来源:origin: org.onosproject/onos-yang-utils-parser
/**
* Returns the leaf which unique refers.
*
* @param nodeForLeaf last node where leaf is referred
* @param leafInUnique leaf in unique path
* @return YANG leaf
*/
private static YangLeaf getReferenceLeafFromUnique(YangNode nodeForLeaf, YangAtomicPath leafInUnique) {
YangLeavesHolder leavesHolder = (YangLeavesHolder) nodeForLeaf;
List<YangLeaf> leaves = leavesHolder.getListOfLeaf();
if (leaves != null && !leaves.isEmpty()) {
for (YangLeaf leaf : leaves) {
if (leafInUnique.getNodeIdentifier().getName().equals(leaf.getName())) {
return leaf;
}
}
}
return null;
}
代码示例来源:origin: org.onosproject/onos-yang-utils-parser
/**
* Returns the augment name, after removing the prefix, in each atomic
* content, which is equal to the root prefix.
*
* @param atomics atomic content list
* @param root root node
* @return prefix removed augment name
*/
public static String getPrefixRemovedName(List<YangAtomicPath> atomics,
YangNode root) {
String rootPrefix = getRootPrefix(root);
StringBuilder builder = new StringBuilder();
for (YangAtomicPath atomic : atomics) {
String id;
String prefix = atomic.getNodeIdentifier().getPrefix();
String name = atomic.getNodeIdentifier().getName();
if (rootPrefix.equals(prefix) || prefix == null) {
id = SLASH_FOR_STRING + name;
} else {
id = SLASH_FOR_STRING + prefix + COLON + name;
}
builder.append(id);
}
return builder.toString();
}
}
内容来源于网络,如有侵权,请联系作者删除!