本文整理了Java中org.onosproject.yang.compiler.datamodel.YangInput
类的一些代码示例,展示了YangInput
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YangInput
类的具体详情如下:
包路径:org.onosproject.yang.compiler.datamodel.YangInput
类名称:YangInput
[英]Represents data model node to maintain information defined in YANG input.
[中]表示数据模型节点,以维护输入中定义的信息。
代码示例来源:origin: org.onosproject/onos-yang-compiler-datamodel
@Override
public void detectSelfCollision(String identifierName,
YangConstructType dataType)
throws DataModelException {
if (getName().equals(identifierName)) {
throw new DataModelException(
getErrorMsgCollision(COLLISION_DETECTION, getName(),
getLineNumber(), getCharPosition(),
INPUT, getFileName()));
}
}
代码示例来源:origin: org.onosproject/onos-yang-compiler-datamodel
@Override
public void setLeafNameSpaceAndAddToParentSchemaMap() {
// Add namespace for all leafs.
for (YangLeaf yangLeaf : listOfLeaf) {
yangLeaf.setLeafNameSpaceAndAddToParentSchemaMap(getNameSpace());
}
// Add namespace for all leaf list.
for (YangLeafList yangLeafList : listOfLeafList) {
yangLeafList.setLeafNameSpaceAndAddToParentSchemaMap(getNameSpace());
}
}
代码示例来源:origin: org.onosproject/onos-yang-compiler-datamodel
@Override
public void addToChildSchemaMap(YangSchemaNodeIdentifier id,
YangSchemaNodeContextInfo context)
throws DataModelException {
getYsnContextInfoMap().put(id, context);
}
代码示例来源:origin: org.onosproject/onos-yang-compiler-parser
yangInput.setName(INPUT);
yangInput.setLineNumber(ctx.getStart().getLine());
yangInput.setCharPosition(ctx.getStart().getCharPositionInLine());
yangInput.setFileName(listener.getFileName());
YangNode curNode = (YangNode) curData;
try {
代码示例来源:origin: org.onosproject/onos-yang-compiler-datamodel
@Override
public SchemaContext getChildContext(SchemaId schemaId) {
checkNotNull(schemaId, E_ID);
YangSchemaNodeIdentifier id = getNodeIdFromSchemaId(
schemaId, getNameSpace().getModuleNamespace());
try {
YangSchemaNode node = getChildSchema(id).getSchemaNode();
if (node instanceof SchemaDataNode) {
return node;
} else {
throw new IllegalArgumentException(errorMsg(FMT_NOT_EXIST,
schemaId.name(),
getName()));
}
} catch (DataModelException e) {
throw new IllegalArgumentException(e.getMessage());
}
}
}
代码示例来源:origin: org.onosproject/onos-yang-compiler-datamodel
@Override
public void setLeafParentContext() {
// Add parent context for all leafs.
for (YangLeaf yangLeaf : getListOfLeaf()) {
yangLeaf.setParentContext(getParentSchemaContext(this));
}
// Add parent context for all leaf list.
for (YangLeafList yangLeafList : getListOfLeafList()) {
yangLeafList.setParentContext(getParentSchemaContext(this));
}
}
内容来源于网络,如有侵权,请联系作者删除!