public abstract class PartSummaryManager
extends java.lang.Object
implements java.lang.Cloneable
限定符和类型 | 字段和说明 |
---|---|
protected static java.lang.String |
ALGORITHM_ATTRIBUTE_NAME |
protected java.util.HashMap<java.lang.String,PartSummary> |
byRef
ref 索引的摘要
|
protected java.util.HashMap<java.lang.String,PartSummary> |
byUri
名称索引的摘要, 带"/"开头
|
protected AbstractFRPackage |
container |
protected static java.lang.String |
CONTENT_TYPE_ATTRIBUTE_NAME |
static java.lang.String |
CONTENT_TYPES_PART_NAME
summary name
|
static PartSummary |
CORE
core文档块摘要实际上是没有内容的,只是作为占位符,写的时候也会排除
|
protected static java.lang.String |
CORE_REF |
static java.lang.String |
DEFAULT_ALGORITHM |
protected static java.lang.String |
DEFAULT_TAG_NAME |
protected static java.lang.String |
DIGEST_ATTRIBUTE_NAME |
protected static java.lang.String |
PART_NAME_ATTRIBUTE_NAME |
protected static java.lang.String |
PART_NAME_PREFIX |
protected static java.lang.String |
REF_ATTRIBUTE_NAME |
protected static java.lang.String |
REFC_ATTRIBUTE_NAME |
protected static java.lang.String |
RESOURCE_TAG_NAME |
protected java.util.HashMap<java.lang.String,ResourceSummary> |
resourcesByUri
资源摘要
|
protected static java.lang.String |
TYPES_TAG_NAME |
构造器和说明 |
---|
PartSummaryManager(java.io.InputStream in,
AbstractFRPackage pkg) |
限定符和类型 | 方法和说明 |
---|---|
void |
addSummary(PartSummary summary)
添加摘要
|
void |
clearAll()
清除所有摘要
|
PartSummaryManager |
clone() |
java.util.List<PartSummary> |
getAllPartSummary()
获取所有块摘要
|
PartSummary |
getResourceSummary(java.lang.String partName)
根据名称获取对应的资源摘要
|
PartSummary |
getSummary(java.lang.String partName)
根据名称获取对应的摘要
|
PartSummary |
getSummaryByRef(java.lang.String ref)
根据ref获取对应的摘要,资源摘要没有ref索引
|
boolean |
isSummaryRegister(java.lang.String name)
检查指定的内容是否被注册
|
void |
removeSummary(PartSummary partSummary)
移除一个摘要
|
boolean |
save(java.io.OutputStream outStream)
保存所有摘要
|
protected abstract boolean |
saveImpl(java.io.OutputStream outStream)
保存方法的具体实现,通过save()方法调用,
退出之前调用
|
public static final java.lang.String DEFAULT_ALGORITHM
public static final java.lang.String CONTENT_TYPES_PART_NAME
protected static final java.lang.String TYPES_TAG_NAME
protected static final java.lang.String DEFAULT_TAG_NAME
protected static final java.lang.String RESOURCE_TAG_NAME
protected static final java.lang.String CONTENT_TYPE_ATTRIBUTE_NAME
protected static final java.lang.String PART_NAME_ATTRIBUTE_NAME
protected static final java.lang.String REF_ATTRIBUTE_NAME
protected static final java.lang.String ALGORITHM_ATTRIBUTE_NAME
protected static final java.lang.String DIGEST_ATTRIBUTE_NAME
protected static final java.lang.String REFC_ATTRIBUTE_NAME
protected static final java.lang.String PART_NAME_PREFIX
protected static final java.lang.String CORE_REF
public static final PartSummary CORE
protected AbstractFRPackage container
protected java.util.HashMap<java.lang.String,PartSummary> byRef
protected java.util.HashMap<java.lang.String,PartSummary> byUri
protected java.util.HashMap<java.lang.String,ResourceSummary> resourcesByUri
public PartSummaryManager(java.io.InputStream in, AbstractFRPackage pkg) throws InvalidFormatException
public void addSummary(PartSummary summary)
public void removeSummary(PartSummary partSummary)
partSummary
- 摘要public boolean isSummaryRegister(java.lang.String name)
name
- 待检测的nametrue
, 否则返回 false
.public java.util.List<PartSummary> getAllPartSummary()
@Nullable public PartSummary getSummaryByRef(java.lang.String ref)
ref
- ref@Nullable public PartSummary getSummary(java.lang.String partName)
partName
- part名称@Nullable public PartSummary getResourceSummary(java.lang.String partName)
partName
- part名称public void clearAll()
public PartSummaryManager clone()
clone
在类中 java.lang.Object
public boolean save(java.io.OutputStream outStream)
outStream
- 输出流protected abstract boolean saveImpl(java.io.OutputStream outStream)
outStream
- 摘要的输出流