本文整理了Java中org.onosproject.yang.compiler.datamodel.YangRevision
类的一些代码示例,展示了YangRevision
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YangRevision
类的具体详情如下:
包路径:org.onosproject.yang.compiler.datamodel.YangRevision
类名称:YangRevision
[英]Represents the information about the revision.
[中]表示有关修订的信息。
代码示例来源:origin: org.onosproject/onos-yang-compiler-datamodel
@Override
public int compareTo(YangRevision obj) {
if (this == obj) {
return 0;
}
return getRevDate().compareTo(obj.getRevDate());
}
}
代码示例来源:origin: org.onosproject/onos-yang-compiler-parser
/**
* It is called when parser receives an input matching the grammar rule
* (revision),perform validations and update the data model tree.
*
* @param listener Listener's object
* @param ctx context object of the grammar rule
*/
public static void processRevisionEntry(TreeWalkListener listener,
RevisionStatementContext ctx) {
// Check for stack to be non empty.
checkStackIsNotEmpty(listener, MISSING_HOLDER, REVISION_DATA, ctx.dateArgumentString().getText(), ENTRY);
Date date = getValidDateFromString(ctx.dateArgumentString().getText(), ctx);
YangRevision revisionNode = new YangRevision();
revisionNode.setRevDate(date);
listener.getParsedDataStack().push(revisionNode);
}
代码示例来源:origin: org.onosproject/onos-yang-compiler-datamodel
/**
* Returns date in string format.
*
* @param schemaNode schema node
* @return date in string format
*/
public static String getDateInStringFormat(YangNode schemaNode) {
if (schemaNode != null) {
if (schemaNode.getRevision() != null) {
return new SimpleDateFormat(DATE_FORMAT)
.format(schemaNode.getRevision().getRevDate());
}
}
return null;
}
代码示例来源:origin: org.onosproject/onos-yang-compiler-parser
YangModule module = (YangModule) tmpNode;
if (module.getRevision() != null) {
Date curRevisionDate = module.getRevision().getRevDate();
if (curRevisionDate.before(((YangRevision) tmpRevisionNode).getRevDate())) {
module.setRevision((YangRevision) tmpRevisionNode);
YangSubModule subModule = (YangSubModule) tmpNode;
if (subModule.getRevision() != null) {
Date curRevisionDate = subModule.getRevision().getRevDate();
if (curRevisionDate.before(((YangRevision) tmpRevisionNode).getRevDate())) {
subModule.setRevision((YangRevision) tmpRevisionNode);
代码示例来源:origin: org.onosproject/onos-yang-compiler-datamodel
.getRevision().getRevDate()
.equals(importedModuleRevision))) {
setImportedNode(moduleNode);
代码示例来源:origin: org.onosproject/onos-yang-compiler-datamodel
.getRevision().getRevDate()
.equals(includedSubModuleRevision)) {
setIncludedNode(subModuleNode);
内容来源于网络,如有侵权,请联系作者删除!