public class PageDir extends VirtualContainer
| Modifier and Type | Field and Description |
|---|---|
static String |
AnnotationFileName
记录了页面关联的注解对象
|
static String |
AnnotFilePrefix
注释文件前缀
|
static Pattern |
AnnotFileRegex |
static String |
ContentFileName
页面描述文件名称
|
static String |
PageContainerPrefix
页面容器名称前缀
|
static String |
PageResFileName
记录了资源描述文件名称
|
| Modifier and Type | Method and Description |
|---|---|
PageDir |
add(Path resource)
向页面中增加页面资源
|
ST_Loc |
addAnnot(PageAnnot pageAnnot)
向页面加入新的注释文件
|
ST_Loc |
addAnnot(String fileName,
PageAnnot pageAnnot)
向页面内添加注释文件
|
Path |
get(String name)
获取页面资源
|
Page |
getContent()
获取页面描述对象
|
Integer |
getIndex()
获取页面索引
|
String |
getIndexStr()
获取页面索引字符串,默认为数字如 "1",非规范情况下将返回自定义名称
|
Integer |
getMaxAnnotFileIndex()
获取当Page_N容器中最大的注释文件索引号
|
PageAnnot |
getPageAnnot()
获取分页注释文件
|
Map<String,PageAnnot> |
getPageAnnots()
根据页面注释文件的名称前缀获取该目录下所有注释对象
|
Res |
getPageRes()
获取页面资源描述文件
|
ResDir |
getResDir()
获取资源文件虚拟容器
|
ResDir |
obtainRes()
获取页面资源目录
|
PageDir |
setContent(Page content)
设置页面描述
|
PageDir |
setPageAnnot(PageAnnot pageAnnot)
设置分页注释文件
|
PageDir |
setPageRes(Res pageRes)
设置页面资源描述对象
|
addRaw, clean, close, deleteFile, exist, exit, flush, flushContainerByName, flushFileByName, getAbsLoc, getContainer, getContainerName, getContainerPath, getFile, getFile, getObj, getObj, getParent, getSysAbsPath, obtainContainer, putFile, putFile, putFile, putFileWithPath, putObj, setParentpublic static final Pattern AnnotFileRegex
public static final String PageContainerPrefix
public static final String ContentFileName
public static final String PageResFileName
public static final String AnnotationFileName
public static final String AnnotFilePrefix
GMT0099 OFD 2.0
public PageDir(Path fullDir) throws IllegalArgumentException
IllegalArgumentExceptionpublic Integer getIndex()
NumberFormatException - 非规范的页面索引可能导致该问题public String getIndexStr()
public Res getPageRes() throws FileNotFoundException, org.dom4j.DocumentException
FileNotFoundException - 资源文件不存在org.dom4j.DocumentException - 资源文件解析失败public PageDir setPageRes(Res pageRes)
pageRes - 页面资源描述对象public PageAnnot getPageAnnot() throws FileNotFoundException, org.dom4j.DocumentException
FileNotFoundException - 描述文件不存在org.dom4j.DocumentException - 描述文件内容错误public Map<String,PageAnnot> getPageAnnots() throws IOException
注释文件前缀: Annot_M.xml
Key: 文件名 Value: 注释对象
IOException - 文件读异常public PageDir setPageAnnot(PageAnnot pageAnnot)
pageAnnot - 分页注释文件public ResDir obtainRes()
如果目录不存在则创建
public ResDir getResDir() throws FileNotFoundException
FileNotFoundException - 该页面没有资源文件目录public PageDir add(Path resource) throws IOException
resource - 资源IOException - 文件复制过程中发生异常public ST_Loc addAnnot(PageAnnot pageAnnot) throws IOException
pageAnnot - 注释对象IOException - 文件复制过程中发生异常public ST_Loc addAnnot(String fileName, PageAnnot pageAnnot)
fileName - 文件名称pageAnnot - 注释public Integer getMaxAnnotFileIndex() throws IOException
IOException - 文件读取异常public Path get(String name) throws FileNotFoundException
name - 资源名称,包含后缀FileNotFoundException - 文件不存在public Page getContent() throws FileNotFoundException, org.dom4j.DocumentException
FileNotFoundException - 描述文件不存在org.dom4j.DocumentException - 描述文件内容错误Copyright © 2026. All rights reserved.