- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.onosproject.yangutils.datamodel.YangDerivedInfo
类的一些代码示例,展示了YangDerivedInfo
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YangDerivedInfo
类的具体详情如下:
包路径:org.onosproject.yangutils.datamodel.YangDerivedInfo
类名称:YangDerivedInfo
[英]Represents the derived information.
[中]表示派生的信息。
代码示例来源:origin: org.onosproject/onos-yang-datamodel
YangType<?> baseType = getReferredTypeDef().getTypeDefBaseType();
YangDataTypes type = baseType.getDataType();
T extended = (T) baseType.getDataTypeExtendedInfo();
ResolvableStatus resolvableStatus = resolveTypeDerivedInfo(baseType);
if (resolvableStatus != null) {
return resolvableStatus;
return getResolveStatusForRangeRestrictionType(extended);
} else if (effectiveBuiltInType == STRING) {
return getResolveStatusForString(extended);
} else if (effectiveBuiltInType == BINARY) {
return getResolveStatusForBinary(extended);
} else if (effectiveBuiltInType == DECIMAL64) {
return getResolveStatusForDecimal64(extended);
if (isNullOrEmpty(getLengthRestrictionString()) &&
isNullOrEmpty(getRangeRestrictionString()) &&
getPatternRestriction() == null) {
return RESOLVED;
} else {
throw new DataModelException(getErrorMsg(
"YANG file error: Restrictions can't be applied to a " +
"given type ", "type.", getLineNumber(),
getCharPosition(), getFileName() + "\""));
getLineNumber(), getCharPosition(), getFileName() + "\""));
代码示例来源:origin: org.onosproject/onos-yang-datamodel
throwError();
if (getReferredTypeDef().getTypeDefBaseType()
.getResolvableStatus() == INTRA_FILE_RESOLVED) {
return INTRA_FILE_RESOLVED;
.getDataTypeExtendedInfo()).getEffectiveBuiltInType();
YangDerivedInfo refDerivedInfo = (YangDerivedInfo<?>) baseType.getDataTypeExtendedInfo();
T extendedInfo = (T) refDerivedInfo.getResolvedExtendedInfo();
return getResolveStatusForRangeRestrictionType(extendedInfo);
} else if (effectiveBuiltInType == STRING) {
return getResolveStatusForString(extendedInfo);
} else if (effectiveBuiltInType == BINARY) {
return getResolveStatusForBinary(extendedInfo);
} else if (effectiveBuiltInType == DECIMAL64) {
if (extendedInfo == null) {
resolveRangeRestriction(null);
} else {
if (!(extendedInfo instanceof YangRangeRestriction)) {
throwError();
resolveRangeRestriction((YangRangeRestriction) extendedInfo);
代码示例来源:origin: org.onosproject/onos-yang-datamodel
private void throwError() throws DataModelException {
throw new DataModelException(getErrorMsg(
"Linker error: Referred typedef restriction info is of invalid ",
"type.", getLineNumber(), getCharPosition(), getFileName() + "\""));
}
代码示例来源:origin: org.onosproject/onos-yang-datamodel
/**
* Resolves the binary restrictions.
*
* @param refLr referred length restriction of typedef
* @throws DataModelException a violation in data model rule
*/
private void resolveBinaryRestriction(YangRangeRestriction refLr)
throws DataModelException {
if (rangeRestrictionString != null || patternRestriction != null) {
throw new DataModelException(getErrorMsg(
"YANG file error: for binary range restriction or pattern " +
"restriction is not allowed.", "type.",
getLineNumber(), getCharPosition(), getFileName()));
}
// Get the final resolved length restriction
YangRangeRestriction lr = resolveLengthRestriction(refLr);
// Set the length restriction.
resolvedExtendedInfo = (T) lr;
}
代码示例来源:origin: org.onosproject/onos-yang-datamodel
if (refLenRestriction == null && isNullOrEmpty(getLengthRestrictionString())) {
return null;
if (isNullOrEmpty(getLengthRestrictionString())) {
return refLenRestriction;
null, getLineNumber(), getCharPosition(), false,
getLengthRestrictionString(), getFileName());
processLengthRestriction(refLenRestriction, getLineNumber(),
getCharPosition(), true,
getLengthRestrictionString(), getFileName());
resolveLengthAndRangeRestriction(refLenRestriction, curLengthRestriction);
return curLengthRestriction;
代码示例来源:origin: org.onosproject/onos-yang-datamodel
if (!isNullOrEmpty(getRangeRestrictionString())) {
throw new DataModelException(getErrorMsg(
"YANG file error: Range restriction should't be present for" +
" string data type.", ".", getLineNumber(),
getCharPosition(), getFileName()));
if (refSr == null && isNullOrEmpty(getLengthRestrictionString()) &&
getPatternRestriction() == null) {
return;
YangRangeRestriction lr = resolveLengthRestriction(refRr);
YangPatternRestriction pr = resolvePatternRestriction(refPr);
curSr.setCharPosition(getCharPosition());
curSr.setFileName(getFileName());
curSr.setLineNumber(getLineNumber());
curSr.setLengthRestriction(lr);
curSr.setPatternRestriction(pr);
代码示例来源:origin: org.onosproject/onos-yang-datamodel
if (!isNullOrEmpty(getLengthRestrictionString())
|| getPatternRestriction() != null) {
throw new DataModelException(getErrorMsg(
"YANG file error: Length/Pattern restriction should't be present" +
" for int/uint/decimal data type.", "type.", getLineNumber(),
getCharPosition(), getFileName()));
if (refRangeRestriction == null && isNullOrEmpty(getRangeRestrictionString())) {
return;
if (isNullOrEmpty(getRangeRestrictionString())) {
resolvedExtendedInfo = (T) refRangeRestriction;
return;
processRangeRestriction(null, getLineNumber(),
getCharPosition(), false, getRangeRestrictionString(),
effectiveBuiltInType, getFileName());
resolvedExtendedInfo = (T) curRangeRestriction;
return;
processRangeRestriction(refRangeRestriction, getLineNumber(),
getCharPosition(), true,
getRangeRestrictionString(),
effectiveBuiltInType, getFileName());
resolveLengthAndRangeRestriction(refRangeRestriction, curRangeRestriction);
resolvedExtendedInfo = (T) curRangeRestriction;
代码示例来源:origin: org.onosproject/onos-yang-datamodel
if (extended != null) {
if (((YangDecimal64) extended).getRangeRestrictedExtendedInfo() == null) {
resolveRangeRestriction(null);
if (!(((YangDecimal64) extended)
.getRangeRestrictedExtendedInfo() instanceof YangRangeRestriction)) {
throwError();
resolveRangeRestriction((YangRangeRestriction) (
(YangDecimal64) extended).getRangeRestrictedExtendedInfo());
throw new DataModelException(getErrorMsg(
"Linker error: Unable to find type extended info " +
"for decimal64.", "type.", getLineNumber(),
getCharPosition(), getFileName() + "\""));
代码示例来源:origin: org.onosproject/onos-yang-utils-parser
YangDerivedInfo<?> yangDerivedInfo = new YangDerivedInfo<>();
yangDerivedInfo.setLineNumber(ctx.getStart().getLine());
yangDerivedInfo.setCharPosition(ctx.getStart().getCharPositionInLine());
yangDerivedInfo.setFileName(listener.getFileName());
((YangType<YangDerivedInfo>) type).setDataTypeExtendedInfo(yangDerivedInfo);
YangDerivedInfo<?> yangDerivedInfo = new YangDerivedInfo<>();
yangDerivedInfo.setLineNumber(ctx.getStart().getLine());
yangDerivedInfo.setCharPosition(ctx.getStart().getCharPositionInLine());
yangDerivedInfo.setFileName(listener.getFileName());
((YangType<YangDerivedInfo>) type).setDataTypeExtendedInfo(yangDerivedInfo);
YangDerivedInfo<?> yangDerivedInfo = new YangDerivedInfo<>();
yangDerivedInfo.setLineNumber(ctx.getStart().getLine());
yangDerivedInfo.setCharPosition(ctx.getStart().getCharPositionInLine());
yangDerivedInfo.setFileName(listener.getFileName());
((YangType<YangDerivedInfo>) type).setDataTypeExtendedInfo(yangDerivedInfo);
YangDerivedInfo<?> yangDerivedInfo = new YangDerivedInfo<>();
yangDerivedInfo.setLineNumber(ctx.getStart().getLine());
yangDerivedInfo.setCharPosition(ctx.getStart().getCharPositionInLine());
yangDerivedInfo.setFileName(listener.getFileName());
((YangType<YangDerivedInfo>) type).setDataTypeExtendedInfo(yangDerivedInfo);
代码示例来源:origin: org.onosproject/onos-yang-datamodel
YangDataTypes dataType = ((YangDerivedInfo) getDataTypeExtendedInfo()).getEffectiveBuiltInType();
if (isOfRangeRestrictedType(dataType)) {
if (((YangDerivedInfo) getDataTypeExtendedInfo()).getResolvedExtendedInfo() == null) {
getDataObjectFromString(value,
((YangDerivedInfo) getDataTypeExtendedInfo())
.getEffectiveBuiltInType());
} else {
if (!((YangRangeRestriction) ((YangDerivedInfo) getDataTypeExtendedInfo())
.getResolvedExtendedInfo()).isValidValueString(value)) {
throw new DataTypeException("YANG file error : Input value \"" + value
+ "\" is not a valid " + dataType);
.getResolvedExtendedInfo();
if (info != null) {
if (info instanceof YangStringRestriction) {
.getReferredTypeDef();
YangType type = prevTypedef.getTypeList().iterator().next();
YangBits bits = (YangBits) type.getDataTypeExtendedInfo();
getDataTypeExtendedInfo()).getResolvedExtendedInfo())) {
throw new DataTypeException("YANG file error : Input value \"" + value + "\" is not a valid " +
dataType);
YangTypeDef typedef = (YangTypeDef) derivedInfo.getReferredTypeDef();
YangType<YangDecimal64> decimal64Type =
(YangType<YangDecimal64>) typedef.getTypeList().iterator().next();
代码示例来源:origin: org.onosproject/onos-yang-utils-parser
} else {
YangPatternRestriction patternRestriction = ((YangDerivedInfo<?>) type
.getDataTypeExtendedInfo()).getPatternRestriction();
if (patternRestriction == null) {
patternRestriction = new YangPatternRestriction();
((YangDerivedInfo<?>) type.getDataTypeExtendedInfo()).setPatternRestriction(patternRestriction);
patternRestriction.addPattern(patternArgument);
} else {
((YangDerivedInfo<?>) type.getDataTypeExtendedInfo()).setPatternRestriction(patternRestriction);
patternRestriction.addPattern(patternArgument);
代码示例来源:origin: org.onosproject/onos-yang-datamodel
if (refPr == null && getPatternRestriction() == null) {
return null;
if (getPatternRestriction() == null) {
return refPr;
return getPatternRestriction();
getPatternRestriction().addPattern(pattern);
return getPatternRestriction();
代码示例来源:origin: org.onosproject/onos-yang-datamodel
case DERIVED:
return ((YangDerivedInfo) dataType.getDataTypeExtendedInfo())
.getEffectiveBuiltInType().equals(EMPTY);
if (type.getDataType() == YangDataTypes.DERIVED) {
return ((YangDerivedInfo) type.getDataTypeExtendedInfo())
.getEffectiveBuiltInType().equals(EMPTY);
代码示例来源:origin: org.onosproject/onos-yang-datamodel
/**
* Resolves the length/range self and referred restriction, to check whether
* the all the range interval in self restriction is stricter than the
* referred typedef's restriction.
*
* @param refRestriction referred restriction
* @param curRestriction self restriction
*/
private void resolveLengthAndRangeRestriction(YangRangeRestriction refRestriction,
YangRangeRestriction curRestriction)
throws DataModelException {
for (Object curInterval : curRestriction.getAscendingRangeIntervals()) {
if (!(curInterval instanceof YangRangeInterval)) {
throw new DataModelException(getErrorMsg(
"Linker error: Current range intervals not processed correctly.",
"type.", getLineNumber(), getCharPosition(), getFileName()));
}
try {
refRestriction.isValidInterval((YangRangeInterval)
curInterval, getFileName());
} catch (DataModelException e) {
throw new DataModelException(getErrorMsg(
e.getMessage(), "type.", getLineNumber(), getCharPosition(),
getFileName()));
}
}
}
本文整理了Java中org.batfish.datamodel.Zone类的一些代码示例,展示了Zone类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,
我似乎无法将文本数据(例如 CSV、JSON 或 XML 文件)添加到 Roblox DataModel 、Workspace、ServerStorage 还是任何地方? 关于如何高效执行此操作的任何
我有一个用位置更新创建的数据库,数据库中有一堆位置 x 和 y。在第二种方法中,readFirestore() 读取位置数据并比较来自 sqlite 数据库的最喜欢的位置,如果最喜欢的位置靠近来自 f
本文整理了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
我是一名优秀的程序员,十分优秀!