Class ImageResourceRegRule
java.lang.Object
org.ofdrw.archive.check.rule.ImageResourceRegRule
- All Implemented Interfaces:
ArchiveRule
规则 19:多页共用的栅格图像应在文档资源中注册(GB/T 42133-2022 6.5a)
遍历所有页面统计每个图像 ResourceID 的引用次数。 若某图像被 ≥2 页面引用但注册在 PageRes → WARN。
- Since:
- 2.4.0
- Author:
- 权观宇
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription对打开的 OFD 文档执行检查
-
Field Details
-
RULE_NAME
- See Also:
-
-
Constructor Details
-
ImageResourceRegRule
public ImageResourceRegRule()
-
-
Method Details
-
check
Description copied from interface:ArchiveRule对打开的 OFD 文档执行检查检查过程只读,不修改文档内容。
- Specified by:
checkin interfaceArchiveRule- Parameters:
reader- OFD 阅读器,提供资源、页面、附件等高级访问能力ofdDir- OFD 虚拟容器,提供低级的文件和目录操作- Returns:
- 发现的违规项列表(非 null),文档合规时返回空列表
-