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
Method | Description |
---|---|
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:
Parameter | Type | Description |
---|---|---|
prefix | java.lang.String | The value of prefix. |
namespaceUri | java.lang.String | The value of namespace URI. |
registerNamespaceUri(String prefix, String namespaceUri, String schemaDescription)
public void registerNamespaceUri(String prefix, String namespaceUri, String schemaDescription)
Registers namespace URI.
Parameters:
Parameter | Type | Description |
---|---|---|
prefix | java.lang.String | The value of prefix. |
namespaceUri | java.lang.String | The value of namespace URI. |
schemaDescription | java.lang.String | The value of schema description. |
getNamespaceUriByPrefix(String prefix)
public String getNamespaceUriByPrefix(String prefix)
Returns namespace URI by prefix.
Parameters:
Parameter | Type | Description |
---|---|---|
prefix | java.lang.String | The 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:
Parameter | Type | Description |
---|---|---|
namespaceUri | java.lang.String | Namespace 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:
Parameter | Type | Description |
---|---|---|
key | java.lang.String | The key to add. |
value | XmpValue | Value which will be added. |
addItem(String key, Object value)
public void addItem(String key, Object value)
Adds value to metadata.
Parameters:
Parameter | Type | Description |
---|---|---|
key | java.lang.String | The key to add. |
value | java.lang.Object | Value which will be added. |
addItem(String prefix, XmpPdfAExtensionObject value)
public void addItem(String prefix, XmpPdfAExtensionObject value)
Adds pdf extension to metadata.
Parameters:
Parameter | Type | Description |
---|---|---|
prefix | java.lang.String | The prefix of extension. |
value | XmpPdfAExtensionObject | Value 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:
Parameter | Type | Description |
---|---|---|
key | java.lang.String | The 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:
Parameter | Type | Description |
---|---|---|
key | java.lang.String | The 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:
Parameter | Type | Description |
---|---|---|
key | java.lang.String | The 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:
Parameter | Type | Description |
---|---|---|
key | java.lang.String | key name |
value | XmpValue | The 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:
Parameter | Type | Description |
---|---|---|
array | com.aspose.ms.System.Collections.Generic.KeyValuePair<java.lang.String,com.aspose.pdf.XmpValue>[] | Destination array. |
index | int | Starting 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:
Parameter | Type | Description |
---|---|---|
array | com.aspose.ms.System.Array | Destination array. |
index | int | Starting index. |
containsKey(String key)
public boolean containsKey(String key)
Determines does this dictionary contasins specified key.
Parameters:
Parameter | Type | Description |
---|---|---|
key | java.lang.String | Key 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:
Parameter | Type | Description |
---|---|---|
key | java.lang.String | Key to search in the dictionary. |
value | java.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:
Parameter | Type | Description |
---|---|---|
key | java.lang.String | Key to search in the dictionary. |
value | XmpValue[] | 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:
Parameter | Type | Description |
---|---|---|
item | com.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:
Parameter | Type | Description |
---|---|---|
item | com.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:
Parameter | Type | Description |
---|---|---|
item | com.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.