- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.onosproject.yang.compiler.datamodel.YangLeafList.getName()
方法的一些代码示例,展示了YangLeafList.getName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YangLeafList.getName()
方法的具体详情如下:
包路径:org.onosproject.yang.compiler.datamodel.YangLeafList
类名称:YangLeafList
方法名:getName
[英]Retrieve the name of leaf list.
[中]检索叶列表的名称。
代码示例来源:origin: org.onosproject/onos-yang-compiler-datamodel
@Override
public SchemaId getSchemaId() {
SchemaId schemaId = new SchemaId(
this.getName(), this.getNameSpace().getModuleNamespace());
return schemaId;
}
代码示例来源:origin: org.onosproject/onos-yang-compiler-linker
/**
* Detects collision with list of leaf-list name and any comparable
* identifier.
*
* @param name comparable identifier
* @param info location info
* @param leavesList list of leaf-list
*/
private static void detectLeafListCollision(String name, LocationInfo info,
List<YangLeafList> leavesList) {
if (leavesList != null && !leavesList.isEmpty()) {
for (YangLeafList ll : leavesList) {
detectCollision(ll.getName(), name, info, TGT_LEAF);
}
}
}
代码示例来源:origin: org.onosproject/onos-yang-compiler-linker
/**
* Returns the leaf-list by searching it in the node by the leaf-list name.
* Returns null when the name doesn't match.
*
* @param name leaf-list name
* @param holder holder of leaf-list
* @return YANG leaf-list
*/
private static YangLeafList getLeafList(YangNodeIdentifier name,
YangLeavesHolder holder) {
List<YangLeafList> listOfLeafList = holder.getListOfLeafList();
if (listOfLeafList != null) {
for (YangLeafList yangLeafList : listOfLeafList) {
if (yangLeafList.getName().equals(name.getName())) {
return yangLeafList;
}
}
}
return null;
}
代码示例来源:origin: org.onosproject/onos-yang-compiler-datamodel
/**
* Sets leaf namespace and add itself to parent child schema map.
*
* @param nameSpace namespace
*/
public void setLeafNameSpaceAndAddToParentSchemaMap(YangNamespace nameSpace) {
setNameSpace(nameSpace);
// Process addition of leaf to schema node map.
((YangNode) getContainedIn()).processAdditionOfSchemaNodeToCurNodeMap(getName(), getNameSpace(), this);
}
代码示例来源:origin: org.onosproject/onos-yang-compiler-datamodel
/**
* Detects the colliding identifier name in a given leaf-list node.
*
* @param listOfLeafList list of leaf-lists to detect collision
* @param identifierName name for which collision detection is to be checked
* @throws DataModelException a violation of data model rules
*/
private static void detectCollidingLeafList(List<YangLeafList> listOfLeafList, String identifierName)
throws DataModelException {
if (listOfLeafList == null) {
return;
}
for (YangLeafList leafList : listOfLeafList) {
if (leafList.getName().equals(identifierName)) {
throw new DataModelException("YANG file error: Duplicate input identifier detected, same as leaf " +
"list \"" + leafList.getName() + " in " +
leafList.getLineNumber() + " at " +
leafList.getCharPosition() +
" in " + leafList.getFileName() + "\"");
}
}
}
代码示例来源:origin: org.onosproject/onos-yang-compiler-datamodel
/**
* Searches for leaf/leaf-list in given leaf holder node.
*
* @param target leaf holder
* @param name leaf/leaf-list name
* @return leaf/leaf-list node
*/
public static YangSchemaNode findLeafNode(YangLeavesHolder target,
String name) {
List<YangLeaf> leaves = target.getListOfLeaf();
if (leaves != null && !leaves.isEmpty()) {
for (YangLeaf leaf : leaves) {
if (leaf.getName().equals(name)) {
return leaf;
}
}
}
List<YangLeafList> listOfleafList = target.getListOfLeafList();
if (listOfleafList != null && !listOfleafList.isEmpty()) {
for (YangLeafList leafList : listOfleafList) {
if (leafList.getName().equals(name)) {
return leafList;
}
}
}
return null;
}
代码示例来源:origin: org.onosproject/onos-yang-compiler-linker
/**
* Detects collision between augment's leaves and leaf lists' identifier
* with target node leaves and leaf lists' identifier.
*
* @param tL target leaves
* @param tLl target leaf lists
* @param aL augment leaves
* @param aLl augment leaf lists
*/
private static void detectLeavesCollision(List<YangLeaf> tL,
List<YangLeafList> tLl,
List<YangLeaf> aL,
List<YangLeafList> aLl) {
if (aL != null && !aL.isEmpty()) {
for (YangLeaf aLeaf : aL) {
detectLeafCollision(aLeaf.getName(), aLeaf, tL);
detectLeafListCollision(aLeaf.getName(), aLeaf, tLl);
}
}
if (aLl != null && !aLl.isEmpty()) {
for (YangLeafList aLeafList : aLl) {
detectLeafCollision(aLeafList.getName(), aLeafList, tL);
detectLeafListCollision(aLeafList.getName(), aLeafList, tLl);
}
}
}
代码示例来源:origin: org.onosproject/onos-yang-compiler-datamodel
/**
* Removes leaf/leaf-list from data model tree.
*
* @param node YANG data model node
* @param leafName name of leaf to be removed
*/
public static void deleteUnsupportedLeafOrLeafList(YangLeavesHolder node,
String leafName) {
List<YangLeaf> leaves = node.getListOfLeaf();
if (leaves != null && !leaves.isEmpty()) {
for (YangLeaf leaf : leaves) {
if (leaf.getName().equals(leafName)) {
node.removeLeaf(leaf);
return;
}
}
}
List<YangLeafList> leafList = node.getListOfLeafList();
if (leafList != null && !leafList.isEmpty()) {
for (YangLeafList leaf : leafList) {
if (leaf.getName().equals(leafName)) {
node.removeLeafList(leaf);
return;
}
}
}
}
代码示例来源:origin: org.onosproject/onos-yang-compiler-linker
/**
* Searches target leaf in root node.
*
* @param node root node
* @param curNodeId YANG node identifier
* @return linked target leaf node holder
*/
private YangNode searchTargetLeaf(YangNode node,
YangNodeIdentifier curNodeId) {
YangLeavesHolder holder = (YangLeavesHolder) node;
List<YangLeafList> leavesList = holder.getListOfLeafList();
if (leavesList != null && !leavesList.isEmpty()) {
for (YangLeafList leafList : leavesList) {
if (leafList.getName().equals(curNodeId.getName())) {
return node;
}
}
}
List<YangLeaf> leaves = holder.getListOfLeaf();
if (leaves != null && !leaves.isEmpty()) {
for (YangLeaf leaf : leaves) {
if (leaf.getName().equals(curNodeId.getName())) {
return node;
}
}
}
return null;
}
代码示例来源:origin: org.onosproject/onos-yang-compiler-datamodel
@Override
public YangSchemaNodeContextInfo getChildSchema(
YangSchemaNodeIdentifier dataNodeIdentifier)
throws DataModelException {
throw new DataModelException("leaf cannot have any child schema nodes" +
getName() + " in " +
getLineNumber() + " at " +
getCharPosition() +
" in " + getFileName() + "\"");
}
代码示例来源:origin: org.onosproject/onos-yang-compiler-datamodel
@Override
public int getMandatoryChildCount()
throws DataModelException {
throw new DataModelException("leaf list can't have child " + getName() + " in " +
getLineNumber() + " at " +
getCharPosition() +
" in " + getFileName() + "\"");
}
代码示例来源:origin: org.onosproject/onos-yang-compiler-linker
/**
* Searches for the referred leaf-list in target node.
*
* @param targetNode target node
* @param name leaf-list name
* @return target leaf-list
*/
private YangLeafList searchReferredLeafList(YangNode targetNode, String name) {
if (!(targetNode instanceof YangLeavesHolder)) {
throw new LinkerException(getErrorMsg(
LEAF_HOLDER_ERROR, targetNode.getName(), targetNode
.getLineNumber(), targetNode.getCharPosition(),
targetNode.getFileName()));
}
YangLeavesHolder holder = (YangLeavesHolder) targetNode;
List<YangLeafList> leavesList = holder.getListOfLeafList();
if (leavesList != null && !leavesList.isEmpty()) {
for (YangLeafList leafList : leavesList) {
if (leafList.getName().equals(name)) {
return leafList;
}
}
}
return null;
}
代码示例来源:origin: org.onosproject/onos-yang-compiler-parser
break;
case LEAF_LIST_DATA:
bitsNode.setBitsName(((YangLeafList) tmpData).getName());
break;
case TYPEDEF_DATA:
代码示例来源:origin: org.onosproject/onos-yang-compiler-parser
case LEAF_LIST_DATA:
unionNode.setName(((YangLeafList) tmpData).getName() + UNION_CLASS_SUFFIX);
代码示例来源:origin: org.onosproject/onos-yang-compiler-parser
case LEAF_LIST_DATA:
enumerationNode.setName(((YangLeafList) tmpData).getName() + ENUMERATION_CLASS_SUFFIX);
代码示例来源:origin: org.onosproject/onos-yang-compiler-linker
for (YangLeafList leafList : augment.getListOfLeafList()) {
YangCase javaCase = getYangCaseNode(JAVA_GENERATION);
javaCase.setName(leafList.getName());
javaCase.addLeafList(leafList);
augment.addChild(javaCase);
代码示例来源:origin: org.onosproject/onos-yang-compiler-linker
try {
((CollisionDetector) destLeafHolder)
.detectCollidingChild(leafList.getName(), LEAF_LIST_DATA);
clonedLeafList = leafList.cloneForDeviation();
clonedLeafList.setReferredSchemaLeafList(leafList);
代码示例来源:origin: org.onosproject/onos-yang-compiler-datamodel
try {
((CollisionDetector) usesParent)
.detectCollidingChild(leafList.getName(), LEAF_LIST_DATA);
clonedLeafList = leafList.clone();
clonedLeafList.setReferredSchemaLeafList(leafList);
本文整理了Java中org.onosproject.yangutils.datamodel.YangReferenceResolver类的一些代码示例,展示了YangReferenceResolver
本文整理了Java中org.onosproject.yangutils.datamodel.YangNode类的一些代码示例,展示了YangNode类的具体用法。这些代码示例主要来源于Github/S
本文整理了Java中org.onosproject.yangutils.datamodel.YangUnion类的一些代码示例,展示了YangUnion类的具体用法。这些代码示例主要来源于Github
本文整理了Java中org.onosproject.yangutils.datamodel.YangTypeDef类的一些代码示例,展示了YangTypeDef类的具体用法。这些代码示例主要来源于Gi
本文整理了Java中org.onosproject.yangutils.datamodel.YangType类的一些代码示例,展示了YangType类的具体用法。这些代码示例主要来源于Github/S
本文整理了Java中org.onosproject.yangutils.datamodel.YangSubModule类的一些代码示例,展示了YangSubModule类的具体用法。这些代码示例主要来
本文整理了Java中org.onosproject.yangutils.datamodel.YangRevision类的一些代码示例,展示了YangRevision类的具体用法。这些代码示例主要来源于
本文整理了Java中org.onosproject.yangutils.datamodel.YangRpc类的一些代码示例,展示了YangRpc类的具体用法。这些代码示例主要来源于Github/Sta
本文整理了Java中org.onosproject.yangutils.datamodel.YangPatternRestriction类的一些代码示例,展示了YangPatternRestricti
本文整理了Java中org.onosproject.yangutils.datamodel.YangStringRestriction类的一些代码示例,展示了YangStringRestriction
本文整理了Java中org.onosproject.yangutils.datamodel.YangFeature类的一些代码示例,展示了YangFeature类的具体用法。这些代码示例主要来源于Gi
本文整理了Java中org.onosproject.yangutils.datamodel.YangLeafRef类的一些代码示例,展示了YangLeafRef类的具体用法。这些代码示例主要来源于Gi
本文整理了Java中org.onosproject.yangutils.datamodel.YangLeafList类的一些代码示例,展示了YangLeafList类的具体用法。这些代码示例主要来源于
本文整理了Java中org.onosproject.yangutils.datamodel.YangLeaf类的一些代码示例,展示了YangLeaf类的具体用法。这些代码示例主要来源于Github/S
本文整理了Java中org.onosproject.yangutils.datamodel.YangList类的一些代码示例,展示了YangList类的具体用法。这些代码示例主要来源于Github/S
本文整理了Java中org.onosproject.yangutils.datamodel.YangNodeIdentifier类的一些代码示例,展示了YangNodeIdentifier类的具体用法
本文整理了Java中org.onosproject.yangutils.datamodel.YangAugment类的一些代码示例,展示了YangAugment类的具体用法。这些代码示例主要来源于Gi
本文整理了Java中org.onosproject.yangutils.datamodel.YangCase类的一些代码示例,展示了YangCase类的具体用法。这些代码示例主要来源于Github/S
本文整理了Java中org.onosproject.yangutils.datamodel.YangAtomicPath类的一些代码示例,展示了YangAtomicPath类的具体用法。这些代码示例主
本文整理了Java中org.onosproject.yangutils.datamodel.YangEnumeration类的一些代码示例,展示了YangEnumeration类的具体用法。这些代码示
我是一名优秀的程序员,十分优秀!