org.opendaylight.yangtools.yang.model.api.Module.getDescription()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(3.3k)|赞(0)|评价(0)|浏览(70)

本文整理了Java中org.opendaylight.yangtools.yang.model.api.Module.getDescription()方法的一些代码示例,展示了Module.getDescription()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Module.getDescription()方法的具体详情如下:
包路径:org.opendaylight.yangtools.yang.model.api.Module
类名称:Module
方法名:getDescription

Module.getDescription介绍

暂无

代码示例

代码示例来源:origin: org.opendaylight.mdsal/mdsal-binding-generator-impl

@Override
void addCodegenInformation(final GeneratedTypeBuilderBase<?> genType, final Module module) {
  YangSourceDefinition.of(module).ifPresent(genType::setYangSourceDefinition);
  TypeComments.description(module).ifPresent(genType::addComment);
  module.getDescription().ifPresent(genType::setDescription);
  module.getReference().ifPresent(genType::setReference);
}

代码示例来源:origin: org.opendaylight.yangtools/binding-generator-impl

private String createDescription(final Module module) {
  final StringBuilder sb = new StringBuilder();
  final String formattedDescription = YangTemplate.formatToParagraph(module.getDescription(), 0);
  if (!isNullOrEmpty(formattedDescription)) {
    sb.append(formattedDescription);
    sb.append(NEW_LINE);
  }
  if (verboseClassComments) {
    sb.append("<p>");
    sb.append("This class represents the following YANG schema fragment defined in module <b>");
    sb.append(module.getName());
    sb.append("</b>");
    sb.append(NEW_LINE);
    sb.append("<br>Source path: <i>");
    sb.append(module.getModuleSourcePath());
    sb.append("</i>):");
    sb.append(NEW_LINE);
    sb.append("<pre>");
    sb.append(NEW_LINE);
    sb.append(YangTemplate.generateYangSnipet(module));
    sb.append("</pre>");
  }
  return sb.toString();
}

代码示例来源:origin: org.opendaylight.netconf/sal-rest-docgen

private void addRootPostLink(final Module module, final DataNodeContainer node, final List<Parameter> pathParams,
    final String resourcePath, final List<Api> apis) {
  if (containsListOrContainer(module.getChildNodes())) {
    final Api apiForRootPostUri = new Api();
    apiForRootPostUri.setPath(resourcePath);
    apiForRootPostUri.setOperations(operationPost(module.getName() + MODULE_NAME_SUFFIX,
        module.getDescription(), module, pathParams, true));
    apis.add(apiForRootPostUri);
  }
}

代码示例来源:origin: org.opendaylight.yangtools/binding-generator-impl

/**
 * Create GeneratedTypeBuilder object from module argument.
 *
 * @param module
 *            Module object from which builder will be created
 * @return <code>GeneratedTypeBuilder</code> which is internal
 *         representation of the module
 * @throws IllegalArgumentException
 *             if module is null
 */
private GeneratedTypeBuilder moduleToDataType(final Module module) {
  checkArgument(module != null, "Module reference cannot be NULL.");
  final GeneratedTypeBuilder moduleDataTypeBuilder = moduleTypeBuilder(module, "Data");
  addImplementedInterfaceFromUses(module, moduleDataTypeBuilder);
  moduleDataTypeBuilder.addImplementsType(DATA_ROOT);
  moduleDataTypeBuilder.addComment(module.getDescription());
  moduleDataTypeBuilder.setDescription(createDescription(module));
  moduleDataTypeBuilder.setReference(module.getReference());
  return moduleDataTypeBuilder;
}

代码示例来源:origin: org.opendaylight.yangtools/binding-generator-impl

_builder.append("    ");
Date _revision_1 = module.getRevision();
String _description = module.getDescription();
CharSequence _writeRevision = YangTemplate.writeRevision(_revision_1, _description);
_builder.append(_writeRevision, "    ");

相关文章