- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.onosproject.yangutils.datamodel.YangLeaf
类的一些代码示例,展示了YangLeaf
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YangLeaf
类的具体详情如下:
包路径:org.onosproject.yangutils.datamodel.YangLeaf
类名称:YangLeaf
[英]Represents leaf data represented in YANG.
[中]表示以YANG表示的叶数据。
代码示例来源:origin: org.onosproject/onos-yang-datamodel
@Override
public int getMandatoryChildCount()
throws DataModelException {
throw new DataModelException("Leaf can't have child. " +
getName() + " in " +
getLineNumber() + " at " +
getCharPosition() +
" in " + getFileName() + "\"");
}
代码示例来源:origin: org.onosproject/onos-yang-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-datamodel
@Override
public void isValueValid(String value)
throws DataModelException {
getDataType().isValidValue(value);
}
代码示例来源:origin: org.onosproject/onos-yang-datamodel
@Override
public void addIfFeatureList(YangIfFeature ifFeature) {
if (getIfFeatureList() == null) {
setIfFeatureList(new LinkedList<>());
}
getIfFeatureList().add(ifFeature);
}
代码示例来源:origin: org.onosproject/onos-yang-utils-parser
leaf.setName(identifier);
leaf.setLineNumber(line);
leaf.setCharPosition(charPositionInLine);
leaf.setFileName(listener.getFileName());
leaf.setConfig(parentConfig);
leavesHolder = (YangLeavesHolder) tmpData;
leavesHolder.addLeaf(leaf);
leaf.setContainedIn(leavesHolder);
if (tmpData instanceof YangList) {
YangList list = (YangList) tmpData;
if (list.isConfig()) {
for (String key : list.getKeyList()) {
if (key.equals(leaf.getName())) {
leaf.setKeyLeaf(true);
代码示例来源:origin: org.onosproject/onos-yang-datamodel
try {
((CollisionDetector) usesParent)
.detectCollidingChild(leaf.getName(), LEAF_DATA);
clonedLeaf = leaf.clone();
clonedLeaf.setReferredLeaf(leaf);
addUnresolvedType(this, clonedLeaf, (YangNode) usesParent);
} catch (CloneNotSupportedException | DataModelException e) {
clonedLeaf.setContainedIn(usesParent);
usesParent.addLeaf(clonedLeaf);
代码示例来源:origin: org.onosproject/onos-yang-datamodel
/**
* Adds the list of leaf present under a node to resolution list, after
* cloning. Under the cloned node, with cloned leaf, attributes are set
* and added to resolution list.
*
* @param clonedNode holder node
* @param yangUses YANG uses
* @throws CloneNotSupportedException clone not supported error
* @throws DataModelException data model error
*/
public static void cloneListOfLeaf(
YangLeavesHolder clonedNode, YangUses yangUses)
throws CloneNotSupportedException, DataModelException {
List<YangLeaf> leaves = clonedNode.getListOfLeaf();
if (nonEmpty(leaves)) {
List<YangLeaf> clonedLeaves = new LinkedList<>();
for (YangLeaf leaf : leaves) {
YangLeaf clonedLeaf = leaf.clone();
clonedLeaf.setReferredLeaf(leaf);
addUnresolvedType(yangUses, clonedLeaf, (YangNode) clonedNode);
clonedLeaf.setContainedIn(clonedNode);
clonedLeaves.add(clonedLeaf);
}
clonedNode.setListOfLeaf(clonedLeaves);
}
}
代码示例来源:origin: org.onosproject/onos-yang-datamodel
if (leaves != null && !leaves.isEmpty()) {
for (YangLeaf leaf : leaves) {
if (key.equals(leaf.getName())) {
if (leaf.getDataType().getDataType() == YangDataTypes.EMPTY) {
throw new DataModelException(" A leaf that is part of the key must not be the built-in " +
"type \"empty\"." +
if (isConfig != keyLeaf.isConfig()) {
throw new DataModelException("All key leafs in a list must have the same value for their" +
" \"config\" as the list itself." +
代码示例来源: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-datamodel
if (currentListOfLeaves != null) {
for (YangLeaf leaf : currentListOfLeaves) {
if (leaf.getDataType().getDataType() == YangDataTypes.ENUMERATION
|| leaf.getDataType().getDataType() == YangDataTypes.UNION) {
try {
YangType<?> clonedType = leaf.getDataType().clone();
updateClonedTypeRef(clonedType, leavesHolder);
leaf.setDataType(clonedType);
} catch (DataModelException e) {
throw e;
e.printStackTrace();
throw new DataModelException("Could not clone Type node " +
leaf.getDataType().getDataTypeName() + " in " +
leaf.getDataType().getLineNumber() + " at " +
leaf.getDataType().getCharPosition() +
" in " + leaf.getDataType().getFileName() + "\"");
代码示例来源:origin: org.onosproject/onos-yang-datamodel
YangType baseType = yangLeaf.getDataType();
YangLeafRef referredLeafRefInfo = (YangLeafRef) (yangLeaf.getDataType().getDataTypeExtendedInfo());
List<YangIfFeature> referredLeafIfFeatureList = yangLeaf.getIfFeatureList();
if (referredLeafIfFeatureList != null && !referredLeafIfFeatureList.isEmpty()) {
Iterator<YangIfFeature> referredLeafIfFeature = referredLeafIfFeatureList.iterator();
代码示例来源:origin: org.onosproject/onos-yang-utils-parser
case LEAF_DATA:
YangLeaf leaf = (YangLeaf) tmpData;
leaf.setDataType(type);
代码示例来源:origin: org.onosproject/onos-yang-utils-parser
bitsNode.setBitsName(((YangLeaf) tmpData).getName());
break;
case LEAF_LIST_DATA:
代码示例来源:origin: org.onosproject/onos-yang-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-utils-parser
case LEAF_DATA:
unionNode.setName(((YangLeaf) tmpData).getName() + UNION_CLASS_SUFFIX);
代码示例来源:origin: org.onosproject/onos-yang-datamodel
/**
* Returns types that has to be resolved for a single leaf/leaf-list.
* Identifies the object to be leaf/leaf-list and assigns respective
* parameters to resolve the types under leaf/leaf-list.
*
* @param clonedObj leaf/leaf-list object
* @param holderNode holder node
* @param yangUses YANG uses
* @return list of resolvable entities in a leaf/leaf-list
* @throws DataModelException data model error
*/
private static List<YangEntityToResolveInfoImpl> getTypesToBeResolved(
Object clonedObj, YangNode holderNode,
YangUses yangUses) throws DataModelException {
YangType type;
if (clonedObj instanceof YangLeaf) {
YangLeaf clonedLeaf = (YangLeaf) clonedObj;
type = clonedLeaf.getDataType();
return getUnresolvedTypeList(type.getDataType(), type, holderNode,
yangUses, true);
}
YangLeafList clonedLeafList = (YangLeafList) clonedObj;
type = clonedLeafList.getDataType();
return getUnresolvedTypeList(type.getDataType(), type, holderNode,
yangUses, false);
}
代码示例来源:origin: org.onosproject/onos-yang-datamodel
/**
* Detects the colliding identifier name in a given leaf node.
*
* @param listOfLeaf List of leaves 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 detectCollidingLeaf(List<YangLeaf> listOfLeaf, String identifierName)
throws DataModelException {
if (listOfLeaf == null) {
return;
}
for (YangLeaf leaf : listOfLeaf) {
if (leaf.getName().equals(identifierName)) {
throw new DataModelException("YANG file error: Duplicate input identifier detected, same as leaf \"" +
leaf.getName() + " in " +
leaf.getLineNumber() + " at " +
leaf.getCharPosition() +
" in " + leaf.getFileName() + "\"");
}
}
}
代码示例来源:origin: org.onosproject/onos-yang-utils-parser
case LEAF_DATA:
enumerationNode.setName(((YangLeaf) tmpData).getName() + ENUMERATION_CLASS_SUFFIX);
本文整理了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类的具体用法。这些代码示
我是一名优秀的程序员,十分优秀!