Metadata

Inheritance: java.lang.Object

All Implemented Interfaces: com.aspose.ms.System.Collections.Generic.IGenericDictionary

public final class Metadata implements System.Collections.Generic.IGenericDictionary<String,XmpValue>

Provides access to XMP metadata stream.

Methods

MethodDescription
registerNamespaceUri(String prefix, String namespaceUri)Registers namespace URI.
registerNamespaceUri(String prefix, String namespaceUri, String schemaDescription)Registers namespace URI.
getNamespaceUriByPrefix(String prefix)Returns namespace URI by prefix.
getPrefixByNamespaceUri(String namespaceUri)Returns prefix by namespace URI.
addItem(String key, XmpValue value)Adds value to metadata.
addItem(String key, Object value)Adds value to metadata.
addItem(String prefix, XmpPdfAExtensionObject value)Adds pdf extension to metadata.
clear()Clears metadata.
contains(String key)Checks does key is contained in metadata.
iterator()Returns dictionary enumerator.
isFixedSize()Checks if colleciton has fixed size.
isReadOnly()Checks if collection is read-only.
getKeys()Gets collection of metadata keys.
removeItemByKey(String key)Removes entry from metadata.
getValues()Gets values in the metadata.
getExtensionFields_Internal()For Internal usage only.
getExtensionFields()Gets the dictionary of extension fields.
get_Item(String key)Gets data from metadata.
set_Item(String key, XmpValue value)Sets data from metadata.
copyToTArray(System.Collections.Generic.KeyValuePair<String,XmpValue>[] array, int index)Copies elements of the collection into array.
size()Gets count of elements in the collection.
isSynchronized()Checks if collection is synchronized.
getSyncRoot()Gets collection synchronization object.
iteratorIE()Gets enumerator of the collection.
iterator_Rename_Namesake()
copyTo(System.Array array, int index)Copies elements of the collection into array.
containsKey(String key)Determines does this dictionary contasins specified key.
tryGetValue(String key, Object[] value)Tries to find key in the dictionary and retreives value if found.
tryGetValue(String key, XmpValue[] value)Tries to find key in the dictionary and retreives value if found.
addItem(System.Collections.Generic.KeyValuePair<String,XmpValue> item)Adds pair with key and value into the dictionary.
containsItem(System.Collections.Generic.KeyValuePair<String,XmpValue> item)Checks does specified key-value pair is contained in the dictionary.
removeItem(System.Collections.Generic.KeyValuePair<String,XmpValue> item)Removes key/value pair from the colleciton.

registerNamespaceUri(String prefix, String namespaceUri)

public void registerNamespaceUri(String prefix, String namespaceUri)

Registers namespace URI.

Parameters:

ParameterTypeDescription
prefixjava.lang.StringThe value of prefix.
namespaceUrijava.lang.StringThe value of namespace URI.

registerNamespaceUri(String prefix, String namespaceUri, String schemaDescription)

public void registerNamespaceUri(String prefix, String namespaceUri, String schemaDescription)

Registers namespace URI.

Parameters:

ParameterTypeDescription
prefixjava.lang.StringThe value of prefix.
namespaceUrijava.lang.StringThe value of namespace URI.
schemaDescriptionjava.lang.StringThe value of schema description.

getNamespaceUriByPrefix(String prefix)

public String getNamespaceUriByPrefix(String prefix)

Returns namespace URI by prefix.

Parameters:

ParameterTypeDescription
prefixjava.lang.StringThe value of prefix.

Returns: java.lang.String - The value of namespace URI.

getPrefixByNamespaceUri(String namespaceUri)

public String getPrefixByNamespaceUri(String namespaceUri)

Returns prefix by namespace URI.

Parameters:

ParameterTypeDescription
namespaceUrijava.lang.StringNamespace URI.

Returns: java.lang.String - The value of prefix.

addItem(String key, XmpValue value)

public void addItem(String key, XmpValue value)

Adds value to metadata.

Parameters:

ParameterTypeDescription
keyjava.lang.StringThe key to add.
valueXmpValueValue which will be added.

addItem(String key, Object value)

public void addItem(String key, Object value)

Adds value to metadata.

Parameters:

ParameterTypeDescription
keyjava.lang.StringThe key to add.
valuejava.lang.ObjectValue which will be added.

addItem(String prefix, XmpPdfAExtensionObject value)

public void addItem(String prefix, XmpPdfAExtensionObject value)

Adds pdf extension to metadata.

Parameters:

ParameterTypeDescription
prefixjava.lang.StringThe prefix of extension.
valueXmpPdfAExtensionObjectValue which will be added.

clear()

public void clear()

Clears metadata.

contains(String key)

public boolean contains(String key)

Checks does key is contained in metadata.

Parameters:

ParameterTypeDescription
keyjava.lang.StringThe key of entry to find.

Returns: boolean - True if key is contained in the metadata.

iterator()

public System.Collections.Generic.IGenericEnumerator<System.Collections.Generic.KeyValuePair<String,XmpValue>> iterator()

Returns dictionary enumerator.

Returns: com.aspose.ms.System.Collections.Generic.IGenericEnumerator<com.aspose.ms.System.Collections.Generic.KeyValuePair<java.lang.String,com.aspose.pdf.XmpValue» - Enumerator.

isFixedSize()

public boolean isFixedSize()

Checks if colleciton has fixed size.

Returns: boolean - boolean value

isReadOnly()

public boolean isReadOnly()

Checks if collection is read-only.

Returns: boolean - boolean value

getKeys()

public System.Collections.Generic.IGenericCollection<String> getKeys()

Gets collection of metadata keys.

Returns: com.aspose.ms.System.Collections.Generic.IGenericCollection<java.lang.String> - ICollection object

removeItemByKey(String key)

public boolean removeItemByKey(String key)

Removes entry from metadata.

Parameters:

ParameterTypeDescription
keyjava.lang.StringThe key of entry to remove.

Returns: boolean - True - if key removed; otherwise, false.

getValues()

public System.Collections.Generic.IGenericCollection<XmpValue> getValues()

Gets values in the metadata.

Returns: com.aspose.ms.System.Collections.Generic.IGenericCollection<com.aspose.pdf.XmpValue> - ICollection object

getExtensionFields_Internal()

public System.Collections.Generic.IGenericDictionary<String,XmpPdfAExtensionSchema> getExtensionFields_Internal()

For Internal usage only.

Gets the dictionary of extension fields.

Returns: com.aspose.ms.System.Collections.Generic.IGenericDictionary<java.lang.String,com.aspose.pdf.XmpPdfAExtensionSchema> - internal object

getExtensionFields()

public Hashtable<String,XmpPdfAExtensionSchema> getExtensionFields()

Gets the dictionary of extension fields.

Returns: java.util.Hashtable<java.lang.String,com.aspose.pdf.XmpPdfAExtensionSchema> - Hashtable object

get_Item(String key)

public XmpValue get_Item(String key)

Gets data from metadata.

Parameters:

ParameterTypeDescription
keyjava.lang.StringThe key name.

Returns: XmpValue - Metadata object.

set_Item(String key, XmpValue value)

public void set_Item(String key, XmpValue value)

Sets data from metadata.

Parameters:

ParameterTypeDescription
keyjava.lang.Stringkey name
valueXmpValueThe value object

copyToTArray(System.Collections.Generic.KeyValuePair<String,XmpValue>[] array, int index)

public void copyToTArray(System.Collections.Generic.KeyValuePair<String,XmpValue>[] array, int index)

Copies elements of the collection into array.

Parameters:

ParameterTypeDescription
arraycom.aspose.ms.System.Collections.Generic.KeyValuePair<java.lang.String,com.aspose.pdf.XmpValue>[]Destination array.
indexintStarting index.

size()

public int size()

Gets count of elements in the collection.

Returns: int - int value

isSynchronized()

public boolean isSynchronized()

Checks if collection is synchronized.

Returns: boolean - boolean value

getSyncRoot()

public Object getSyncRoot()

Gets collection synchronization object.

Returns: java.lang.Object - Object for synchronization

iteratorIE()

public Iterator<System.Collections.Generic.KeyValuePair<String,XmpValue>> iteratorIE()

Gets enumerator of the collection.

Returns: java.util.Iterator<com.aspose.ms.System.Collections.Generic.KeyValuePair<java.lang.String,com.aspose.pdf.XmpValue» - IEnumerator object

iterator_Rename_Namesake()

public System.Collections.IEnumerator iterator_Rename_Namesake()

Returns: com.aspose.ms.System.Collections.IEnumerator

copyTo(System.Array array, int index)

public void copyTo(System.Array array, int index)

Copies elements of the collection into array.

Parameters:

ParameterTypeDescription
arraycom.aspose.ms.System.ArrayDestination array.
indexintStarting index.

containsKey(String key)

public boolean containsKey(String key)

Determines does this dictionary contasins specified key.

Parameters:

ParameterTypeDescription
keyjava.lang.StringKey to search in the dictionary.

Returns: boolean - true if key is found.

tryGetValue(String key, Object[] value)

public boolean tryGetValue(String key, Object[] value)

Tries to find key in the dictionary and retreives value if found.

Parameters:

ParameterTypeDescription
keyjava.lang.StringKey to search in the dictionary.
valuejava.lang.Object[]Retreived value.

Returns: boolean - true if key was found.

tryGetValue(String key, XmpValue[] value)

public boolean tryGetValue(String key, XmpValue[] value)

Tries to find key in the dictionary and retreives value if found.

Parameters:

ParameterTypeDescription
keyjava.lang.StringKey to search in the dictionary.
valueXmpValue[]Retreived value.

Returns: boolean - true if key was found.

addItem(System.Collections.Generic.KeyValuePair<String,XmpValue> item)

public void addItem(System.Collections.Generic.KeyValuePair<String,XmpValue> item)

Adds pair with key and value into the dictionary.

Parameters:

ParameterTypeDescription
itemcom.aspose.ms.System.Collections.Generic.KeyValuePair<java.lang.String,com.aspose.pdf.XmpValue>Item to be added.

containsItem(System.Collections.Generic.KeyValuePair<String,XmpValue> item)

public boolean containsItem(System.Collections.Generic.KeyValuePair<String,XmpValue> item)

Checks does specified key-value pair is contained in the dictionary.

Parameters:

ParameterTypeDescription
itemcom.aspose.ms.System.Collections.Generic.KeyValuePair<java.lang.String,com.aspose.pdf.XmpValue>Key-value pair.

Returns: boolean - true if this pauir was found.

removeItem(System.Collections.Generic.KeyValuePair<String,XmpValue> item)

public boolean removeItem(System.Collections.Generic.KeyValuePair<String,XmpValue> item)

Removes key/value pair from the colleciton.

Parameters:

ParameterTypeDescription
itemcom.aspose.ms.System.Collections.Generic.KeyValuePair<java.lang.String,com.aspose.pdf.XmpValue>Key/value pair to be removed.

Returns: boolean - true if pair was found and removed.