public class PageDir extends VirtualContainer
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
AnnotationFileName
记录了页面关联的注解对象
|
static String |
AnnotFilePrefix
注释文件前缀
GMT0099 OFD 2.0
|
static Pattern |
AnnotFileRegex |
static String |
ContentFileName
页面描述文件名称
|
static String |
PageContainerPrefix
页面容器名称前缀
|
static String |
PageResFileName
记录了资源描述文件名称
|
| 限定符和类型 | 方法和说明 |
|---|---|
PageDir |
add(Path resource)
向页面中增加页面资源
|
ST_Loc |
addAnnot(PageAnnot pageAnnot)
向页面加入新的注释文件
|
ST_Loc |
addAnnot(String fileName,
PageAnnot pageAnnot)
向页面内添加注释文件
|
Path |
get(String name)
获取页面资源
|
Page |
getContent()
获取页面描述对象
|
Integer |
getIndex()
获取页面索引
|
Integer |
getMaxAnnotFileIndex()
获取当Page_N容器中最大的注释文件索引号
|
PageAnnot |
getPageAnnot()
获取分页注释文件
|
Map<String,PageAnnot> |
getPageAnnots()
根据页面注释文件的名称前缀获取该目录下所有注释对象
注释文件前缀: Annot_M.xml
Key: 文件名
Value: 注释对象
|
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, getObj, getParent, getSysAbsPath, obtainContainer, putFile, putFileWithPath, putObj, setParentpublic static final Pattern AnnotFileRegex
public PageDir(Path fullDir) throws IllegalArgumentException
public Integer getIndex()
public Res getPageRes() throws FileNotFoundException, org.dom4j.DocumentException
FileNotFoundException - 资源文件不存在org.dom4j.DocumentException - 资源文件解析失败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 © 2023. All rights reserved.