RTF 模板引擎 RTFTemplate

码农软件 · 软件分类 · 模板引擎 · 2019-08-25 13:29:34

软件介绍

RTFTemplate 是一个用来生成 RTF 文档的 Java 模板引擎。

RTFTemplate 的体系结构

示例代码:

  public class RTFProjectTest extends AbstractUseCase {

protected void putContext(IContext context) {
/**
* Context of simply POJO
*/
context.put("date", new Date());
context.put("project", new Project("Jakarta Velocity"));

/**
* Context of list of POJO
*/
List developers = new ArrayList();
Developer developer = new Developer("Will Glass-Husain", "wglass@apache.org");
developer.addRole("Java Developer");
developer.addRole("Release Manager");
....
context.put("developers", developers );
}

public static void main( String[] args ) throws Exception {
RTFProjectTest usecase = new RTFProjectTest();
usecase.run("usecases/project/project_model.rtf");
usecase.saveRTFVelocity(true); // Save RTF file with velocity macro
// Display the XML fields
System.out.println(usecase.getXMLFields());
// Save XML fields into project_model.fields.xml file with update description
usecase.saveTransformedDocument("usecases/project/project_model.fields.xml" ,false);
}
}

本文地址:https://www.codercto.com/soft/d/13138.html

Coming of Age in Second Life

Coming of Age in Second Life

Tom Boellstorff / Princeton University Press / 2008-04-21 / USD 29.95

The gap between the virtual and the physical, and its effect on the ideas of personhood and relationships, is the most interesting aspect of Boellstorff's analysis... Boellstorff's portrayal of a virt......一起来看看 《Coming of Age in Second Life》 这本书的介绍吧!

随机密码生成器
随机密码生成器

多种字符组合密码

MD5 加密
MD5 加密

MD5 加密工具

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具