public static final class DocumentFormat.Builder extends Object
| Modifier and Type | Method and Description |
|---|---|
DocumentFormat |
build() |
DocumentFormat.Builder |
extension(String extension)
指定与文档格式关联的扩展名.
|
DocumentFormat.Builder |
from(DocumentFormat sourceFormat)
通过复制指定文档格式的属性来初始化生成器.
|
DocumentFormat.Builder |
inputFamily(FamilyType inputFamily)
指定与文档格式关联的输入(文档加载时)DocumentFamily.
|
DocumentFormat.Builder |
loadProperty(String name,
Object value)
向生成器添加一个属性,该属性将在加载(打开)这种格式的文档时应用.
|
DocumentFormat.Builder |
mediaType(String mediaType)
指定文档格式的媒体(mime)类型
|
DocumentFormat.Builder |
name(String name)
指定文档格式的名称.
|
DocumentFormat.Builder |
storeProperty(FamilyType family,
String name,
Object value)
向生成器添加一个属性,该属性将在从指定集合的文档存储(保存)为这种格式的文档时应用.
|
DocumentFormat.Builder |
unmodifiable(boolean unmodifiable)
指定文档格式在创建后是否不可修改。默认为
true. |
public DocumentFormat build()
public DocumentFormat.Builder from(DocumentFormat sourceFormat)
sourceFormat - 源文档格式不能为空.public DocumentFormat.Builder extension(String extension)
extension - 扩展名不能为空.public DocumentFormat.Builder inputFamily(FamilyType inputFamily)
inputFamily - DocumentFamily不能为空.public DocumentFormat.Builder loadProperty(String name, Object value)
name - 属性名不能为空.value - 属性值可以为空。如果为空,它将从映射中删除该属性.public DocumentFormat.Builder mediaType(String mediaType)
mediaType - 表示媒体类型的字符串不能为空.public DocumentFormat.Builder name(String name)
name - 文档格式的名称不能为空.public DocumentFormat.Builder unmodifiable(boolean unmodifiable)
true.unmodifiable - true 文档在创建后不能修改格式, false尚未创建则可以修改.public DocumentFormat.Builder storeProperty(FamilyType family, String name, Object value)
family - 源(加载的)文档的文档族不能为空.name - 文档格式的名称不能为空.value - 属性值可以为空。如果为空,它将从映射中删除该属性.Copyright © 2019. All rights reserved.