com.aspose.words
Class CustomDocumentProperties
java.lang.Object
DocumentProperties
com.aspose.words.CustomDocumentProperties
- All Implemented Interfaces:
- java.lang.Cloneable, java.lang.Iterable
public class CustomDocumentProperties
- extends DocumentProperties
A collection of custom document properties.
Each DocumentProperty object represents a custom property of a container document.
The names of the properties are case-insensitive.
The properties in the collection are sorted alphabetically by name.
- See Also:
- Document, Document.BuiltInDocumentProperties, Document.CustomDocumentProperties
Method Summary |
DocumentProperty | add(java.lang.String name, boolean value) | |
Creates a new custom document property of the PropertyType.Boolean data type.
|
DocumentProperty | add(java.lang.String name, double value) | |
Creates a new custom document property of the PropertyType.Float data type.
|
DocumentProperty | add(java.lang.String name, int value) | |
Creates a new custom document property of the PropertyType.Number data type.
|
DocumentProperty | add(java.lang.String name, java.lang.String value) | |
Creates a new custom document property of the PropertyType.String data type.
|
DocumentProperty | add(java.lang.String name, java.util.Date value) | |
Creates a new custom document property of the PropertyType.DateTime data type.
|
void | clear() | → inherited from DocumentProperties |
Removes all properties from the collection.
|
boolean | contains(java.lang.String name) | → inherited from DocumentProperties |
Returns true if a property with the specified name exists in the collection.
|
int | indexOf(java.lang.String name) | → inherited from DocumentProperties |
Gets the index of a property by name.
|
java.util.Iterator | iterator() | → inherited from DocumentProperties |
Returns an iterator object that can be used to iterate over all items in the collection.
|
void | remove(java.lang.String name) | → inherited from DocumentProperties |
Removes a property with the specified name from the collection.
|
void | removeAt(int index) | → inherited from DocumentProperties |
Removes a property at the specified index.
|
Property Getters/Setters Detail |
-
Gets number of items in the collection.
-
Returns a DocumentProperty object by the name of the property.
Returns null if a property with the specified name is not found.
- Parameters:
name
- The case-insensitive name of the property to retrieve.
-
Returns a DocumentProperty object by index.
Note: In Java this method is slow because iterates over all nodes.
- Parameters:
index
- Zero-based index of the DocumentProperty to retrieve.
-
Returns an iterator object that can be used to iterate over all items in the collection.
-
Creates a new custom document property of the PropertyType.String data type.
- Parameters:
name
- The name of the property.value
- The value of the property.
- Returns:
- The newly created property object.
-
Creates a new custom document property of the PropertyType.Number data type.
- Parameters:
name
- The name of the property.value
- The value of the property.
- Returns:
- The newly created property object.
-
Creates a new custom document property of the PropertyType.DateTime data type.
- Parameters:
name
- The name of the property.value
- The value of the property.
- Returns:
- The newly created property object.
-
Creates a new custom document property of the PropertyType.Boolean data type.
- Parameters:
name
- The name of the property.value
- The value of the property.
- Returns:
- The newly created property object.
-
Creates a new custom document property of the PropertyType.Float data type.
- Parameters:
name
- The name of the property.value
- The value of the property.
- Returns:
- The newly created property object.
contains | → inherited from DocumentProperties |
public boolean contains(java.lang.String name) |
-
Returns true if a property with the specified name exists in the collection.
- Parameters:
name
- The case-insensitive name of the property.
- Returns:
- True if the property exists in the collection; false otherwise.
-
Gets the index of a property by name.
Note: In Java this method is slow because iterates over all nodes.
- Parameters:
name
- The case-insensitive name of the property.
- Returns:
- The zero based index. Negative value if not found.
-
Removes a property with the specified name from the collection.
- Parameters:
name
- The case-insensitive name of the property.
-
Removes a property at the specified index.
Note: In Java this method is slow because iterates over all nodes.
- Parameters:
index
- The zero based index.
-
Removes all properties from the collection.
See Also:
Wiki - the home page for the Aspose.Words Product Documentation that includes Programmer's Guide, Knowledge Base and other articles.
Aspose.Words Support Forum - our preferred method of support.
Aspose.Words Team - contact Aspose.Words Team.