public static class POIXMLProperties.CustomProperties
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
FORMAT_ID
Each custom property element contains an fmtid attribute with the same GUID value ({D5CDD505-2E9C-101B-9397-08002B2CF9AE}).
(每个自定义属性元素都包含一个具有相同 GUID 值的 fmtid 属性 ({D5CDD505-2E9C-101B-9397-08002B2CF9AE})。)
|
Modifier and Type | Method and Description |
---|---|
void |
addProperty(java.lang.String name, boolean value)
Add a new boolean property
(添加一个新的布尔属性)
|
void |
addProperty(java.lang.String name, double value)
Add a new double property
(添加新的双重属性)
|
void |
addProperty(java.lang.String name, int value)
Add a new integer property
(添加一个新的整数属性)
|
void |
addProperty(java.lang.String name, java.lang.String value)
Add a new string property
(添加一个新的字符串属性)
|
boolean |
contains(java.lang.String name)
Check if a property with this name already exists in the collection of custom properties
(检查自定义属性集合中是否已存在具有此名称的属性)
|
protected int |
getLastPid()
Find the highest Pid in use
(查找正在使用的最高 Pid)
|
org.openxmlformats.schemas.officeDocument.x2006.customProperties.CTProperty |
getProperty(java.lang.String name)
Retrieve the custom property with this name, or null if none exists.
(检索具有此名称的自定义属性,如果不存在,则为 null。)
|
org.openxmlformats.schemas.officeDocument.x2006.customProperties.CTProperties |
getUnderlyingProperties() |
protected int |
nextPid()
Generate next id that uniquely relates a custom property
(生成唯一关联自定义属性的下一个 id)
|
public static final java.lang.String FORMAT_ID
public org.openxmlformats.schemas.officeDocument.x2006.customProperties.CTProperties getUnderlyingProperties()
public void addProperty(java.lang.String name, java.lang.String value)
name
- the property name
(name - 属性名称)
value
- the property value
(value - 属性值)
java.lang.IllegalArgumentException
- if a property with this name already exists
(java.lang.IllegalArgumentException - 如果同名的属性已经存在)
public void addProperty(java.lang.String name, double value)
name
- the property name
(name - 属性名称)
value
- the property value
(value - 属性值)
java.lang.IllegalArgumentException
- if a property with this name already exists
(java.lang.IllegalArgumentException - 如果同名的属性已经存在)
public void addProperty(java.lang.String name, int value)
name
- the property name
(name - 属性名称)
value
- the property value
(value - 属性值)
java.lang.IllegalArgumentException
- if a property with this name already exists
(java.lang.IllegalArgumentException - 如果同名的属性已经存在)
public void addProperty(java.lang.String name, boolean value)
name
- the property name
(name - 属性名称)
value
- the property value
(value - 属性值)
java.lang.IllegalArgumentException
- if a property with this name already exists
(java.lang.IllegalArgumentException - 如果同名的属性已经存在)
protected int nextPid()
protected int getLastPid()
public boolean contains(java.lang.String name)
name
- the name to check
(name - 要检查的名称)
public org.openxmlformats.schemas.officeDocument.x2006.customProperties.CTProperty getProperty(java.lang.String name)
name
- the name of the property to fetch
(name - 要获取的属性的名称)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.