CustomDocumentPropertyCollection

Inheritance: java.lang.Object, com.aspose.cells.CollectionBase, com.aspose.cells.DocumentPropertyCollection

public class CustomDocumentPropertyCollection extends DocumentPropertyCollection

A collection of custom document properties.

Remarks

Each object represents a custom property of a container document.

Example

         //Instantiate a Workbook object
         Workbook workbook = new Workbook("book1.xls");
 
         //Retrieve a list of all custom document properties of the Excel file
         CustomDocumentPropertyCollection customProperties = workbook.getWorksheets().getCustomDocumentProperties();

Methods

MethodDescription
add(Object o)Adds an item to the CollectionBase instance.
add(String name, boolean value)Creates a new custom document property of the PropertyType.Boolean data type.
add(String name, DateTime value)Creates a new custom document property of the PropertyType.DateTime data type.
add(String name, double value)Creates a new custom document property of the PropertyType.Float data type.
add(String name, int value)Creates a new custom document property of the PropertyType.Number data type.
add(String name, String value)Creates a new custom document property of the PropertyType.String data type.
addLinkToContent(String name, String source)Creates a new custom document property which links to content.
clear()Removes all objects from the CollectionBase instance.
contains(Object o)Return whether instance contains this object
contains(String name)Returns true if a property with the specified name exists in the collection.
equals(Object arg0)
get(int index)Returns a DocumentProperty object by index.
get(String name)Returns a DocumentProperty object by the name of the property.
getClass()
getCount()Gets the number of elements contained in the CollectionBase instance.
hashCode()
indexOf(Object o)Determines the index of a specific item in the CollectionBase instance.
indexOf(String name)Gets the index of a property by name.
iterator()Returns an enumerator that iterates through the CollectionBase instance.
notify()
notifyAll()
remove(String name)Removes a property with the specified name from the collection.
removeAt(int index)Removes a property at the specified index.
toString()
updateLinkedPropertyValue()Update custom document property value which links to content.
updateLinkedRange()Update custom document property value to linked range.
wait()
wait(long arg0)
wait(long arg0, int arg1)

add(Object o)

public int add(Object o)

Adds an item to the CollectionBase instance.

Parameters:

ParameterTypeDescription
ojava.lang.ObjectThe Object to add to the CollectionBase instance.

Returns: int - The position into which the new element was inserted.

add(String name, boolean value)

public DocumentProperty add(String name, boolean value)

Creates a new custom document property of the PropertyType.Boolean data type.

Parameters:

ParameterTypeDescription
namejava.lang.StringThe name of the property.
valuebooleanThe value of the property.

Returns: DocumentProperty - The newly created property object.

add(String name, DateTime value)

public DocumentProperty add(String name, DateTime value)

Creates a new custom document property of the PropertyType.DateTime data type.

Parameters:

ParameterTypeDescription
namejava.lang.StringThe name of the property.
valueDateTimeThe value of the property.

Returns: DocumentProperty - The newly created property object.

add(String name, double value)

public DocumentProperty add(String name, double value)

Creates a new custom document property of the PropertyType.Float data type.

Parameters:

ParameterTypeDescription
namejava.lang.StringThe name of the property.
valuedoubleThe value of the property.

Returns: DocumentProperty - The newly created property object.

add(String name, int value)

public DocumentProperty add(String name, int value)

Creates a new custom document property of the PropertyType.Number data type.

Parameters:

ParameterTypeDescription
namejava.lang.StringThe name of the property.
valueintThe value of the property.

Returns: DocumentProperty - The newly created property object.

add(String name, String value)

public DocumentProperty add(String name, String value)

Creates a new custom document property of the PropertyType.String data type.

Parameters:

ParameterTypeDescription
namejava.lang.StringThe name of the property.
valuejava.lang.StringThe value of the property.

Returns: DocumentProperty - The newly created property object.

addLinkToContent(String name, String source)

public DocumentProperty addLinkToContent(String name, String source)

Creates a new custom document property which links to content.

Parameters:

ParameterTypeDescription
namejava.lang.StringThe name of the property.
sourcejava.lang.StringThe source of the property

Returns: DocumentProperty - The newly created property object.

clear()

public void clear()

Removes all objects from the CollectionBase instance.

contains(Object o)

public boolean contains(Object o)

Return whether instance contains this object

Parameters:

ParameterTypeDescription
ojava.lang.Objecttest object

Returns: boolean - Whether instance contains this object

contains(String name)

public boolean contains(String name)

Returns true if a property with the specified name exists in the collection.

Parameters:

ParameterTypeDescription
namejava.lang.StringThe case-insensitive name of the property.

Returns: boolean - True if the property exists in the collection; false otherwise.

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

get(int index)

public DocumentProperty get(int index)

Returns a DocumentProperty object by index.

Parameters:

ParameterTypeDescription
indexintZero-based index of the DocumentProperty to retrieve.

Returns: DocumentProperty

get(String name)

public DocumentProperty get(String name)

Returns a DocumentProperty object by the name of the property.

Remarks

Returns null if a property with the specified name is not found.

Parameters:

ParameterTypeDescription
namejava.lang.StringThe case-insensitive name of the property to retrieve.

Returns: DocumentProperty

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getCount()

public int getCount()

Gets the number of elements contained in the CollectionBase instance.

Returns: int - The number of elements contained in the CollectionBase instance.

hashCode()

public native int hashCode()

Returns: int

indexOf(Object o)

public int indexOf(Object o)

Determines the index of a specific item in the CollectionBase instance.

Parameters:

ParameterTypeDescription
ojava.lang.ObjectDetermines the index of a specific item in the CollectionBase instance.

Returns: int - The index of value if found in the list; otherwise, -1.

indexOf(String name)

public int indexOf(String name)

Gets the index of a property by name.

Parameters:

ParameterTypeDescription
namejava.lang.StringThe case-insensitive name of the property.

Returns: int - The zero based index. Negative value if not found.

iterator()

public Iterator iterator()

Returns an enumerator that iterates through the CollectionBase instance.

Returns: java.util.Iterator - An iterator for the CollectionBase instance.

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

remove(String name)

public void remove(String name)

Removes a property with the specified name from the collection.

Parameters:

ParameterTypeDescription
namejava.lang.StringThe case-insensitive name of the property.

removeAt(int index)

public void removeAt(int index)

Removes a property at the specified index.

Parameters:

ParameterTypeDescription
indexintThe zero based index.

toString()

public String toString()

Returns: java.lang.String

updateLinkedPropertyValue()

public void updateLinkedPropertyValue()

Update custom document property value which links to content.

updateLinkedRange()

public void updateLinkedRange()

Update custom document property value to linked range.

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int