本文整理了Java中org.onosproject.yangutils.datamodel.YangContainer
类的一些代码示例,展示了YangContainer
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YangContainer
类的具体详情如下:
包路径:org.onosproject.yangutils.datamodel.YangContainer
类名称:YangContainer
[英]Represents data model node to maintain information defined in YANG container.
[中]
代码示例来源:origin: org.onosproject/onos-yang-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-datamodel
@Override
public void addIfFeatureList(YangIfFeature ifFeature) {
if (getIfFeatureList() == null) {
setIfFeatureList(new LinkedList<>());
}
getIfFeatureList().add(ifFeature);
}
代码示例来源:origin: org.onosproject/onos-yang-datamodel
/**
* Validates the data on exiting the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
@Override
public void validateDataOnExit()
throws DataModelException {
List<YangLeaf> leaves = getListOfLeaf();
List<YangLeafList> leafLists = getListOfLeafList();
validateConfig(leaves, leafLists);
}
代码示例来源:origin: org.onosproject/onos-yang-datamodel
@Override
public void addMust(YangMust must) {
if (getListOfMust() == null) {
setListOfMust(new LinkedList<>());
}
getListOfMust().add(must);
}
代码示例来源:origin: org.onosproject/onos-yang-datamodel
@Override
public void setLeafNameSpaceAndAddToParentSchemaMap() {
// Add namespace for all leafs.
for (YangLeaf yangLeaf : getListOfLeaf()) {
yangLeaf.setLeafNameSpaceAndAddToParentSchemaMap(getNameSpace());
}
// Add namespace for all leaf list.
for (YangLeafList yangLeafList : getListOfLeafList()) {
yangLeafList.setLeafNameSpaceAndAddToParentSchemaMap(getNameSpace());
}
}
}
代码示例来源:origin: org.onosproject/onos-yang-datamodel
/**
* Adds a leaf.
*
* @param leaf the leaf to be added
*/
@Override
public void addLeaf(YangLeaf leaf) {
getListOfLeaf().add(leaf);
}
代码示例来源:origin: org.onosproject/onos-yang-datamodel
@Override
public void addToChildSchemaMap(YangSchemaNodeIdentifier schemaNodeIdentifier,
YangSchemaNodeContextInfo yangSchemaNodeContextInfo) {
getYsnContextInfoMap().put(schemaNodeIdentifier, yangSchemaNodeContextInfo);
}
代码示例来源:origin: org.onosproject/onos-yang-datamodel
/**
* Adds a leaf-list.
*
* @param leafList the leaf-list to be added
*/
@Override
public void addLeafList(YangLeafList leafList) {
getListOfLeafList().add(leafList);
}
代码示例来源:origin: org.onosproject/onos-yang-datamodel
if (leaf.isConfig()) {
throw new DataModelException("If a container has \"config\" set to \"false\", no node underneath " +
"it can have \"config\" set to \"true\"." + getName() + " in " +
getLineNumber() + " at " +
getCharPosition() +
" in " + getFileName() + "\"");
throw new DataModelException("If a container has \"config\" set to \"false\", no node underneath " +
"it can have \"config\" set to \"true\"." +
getName() + " in " +
getLineNumber() + " at " +
getCharPosition() +
" in " + getFileName() + "\"");
内容来源于网络,如有侵权,请联系作者删除!