com.aspose.pdf

Interfaces

Classes

Enums

Exceptions

com.aspose.pdf

Class Metadata

  • All Implemented Interfaces:
    com.aspose.ms.System.Collections.Generic.IGenericCollection<com.aspose.ms.System.Collections.Generic.KeyValuePair<String,XmpValue>>, com.aspose.ms.System.Collections.Generic.IGenericDictionary<String,XmpValue>, com.aspose.ms.System.Collections.Generic.IGenericEnumerable<com.aspose.ms.System.Collections.Generic.KeyValuePair<String,XmpValue>>, com.aspose.ms.System.Collections.IEnumerable<com.aspose.ms.System.Collections.Generic.KeyValuePair<String,XmpValue>>, Iterable<com.aspose.ms.System.Collections.Generic.KeyValuePair<String,XmpValue>>


    public final class Metadata
    extends Object
    implements com.aspose.ms.System.Collections.Generic.IGenericDictionary<String,XmpValue>

    Provides access to XMP metadata stream.

    • Method Detail

      • registerNamespaceUri

        public void registerNamespaceUri(String prefix,
                                         String namespaceUri)

        Registers namespace URI.

        Parameters:
        prefix - The value of prefix.
        namespaceUri - The value of namespace URI.
      • registerNamespaceUri

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

        Registers namespace URI.

        Parameters:
        prefix - The value of prefix.
        namespaceUri - The value of namespace URI.
        schemaDescription - The value of schema description.
      • getNamespaceUriByPrefix

        public String getNamespaceUriByPrefix(String prefix)

        Returns namespace URI by prefix.

        Parameters:
        prefix - The value of prefix.
        Returns:
        The value of namespace URI.
      • getPrefixByNamespaceUri

        public String getPrefixByNamespaceUri(String namespaceUri)

        Returns prefix by namespace URI.

        Parameters:
        namespaceUri - Namespace URI.
        Returns:
        The value of prefix.
      • addItem

        public void addItem(String key,
                            XmpValue value)

        Adds value to metadata.

        Specified by:
        addItem in interface com.aspose.ms.System.Collections.Generic.IGenericDictionary<String,XmpValue>
        Parameters:
        key - The key to add.
        value - Value which will be added.
      • addItem

        public void addItem(String key,
                            Object value)

        Adds value to metadata.

        Parameters:
        key - The key to add.
        value - Value which will be added.
      • addItem

        public void addItem(String prefix,
                            XmpPdfAExtensionObject value)

        Adds pdf extension to metadata.

        Parameters:
        prefix - The prefix of extension.
        value - Value which will be added.
      • clear

        public void clear()

        Clears metadata.

        Specified by:
        clear in interface com.aspose.ms.System.Collections.Generic.IGenericCollection<com.aspose.ms.System.Collections.Generic.KeyValuePair<String,XmpValue>>
      • contains

        public boolean contains(String key)

        Checks does key is contained in metadata.

        Parameters:
        key - The key of entry to find.
        Returns:
        True if key is contained in the metadata.
      • iterator

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

        Returns dictionary enumerator.

        Specified by:
        iterator in interface com.aspose.ms.System.Collections.Generic.IGenericEnumerable<com.aspose.ms.System.Collections.Generic.KeyValuePair<String,XmpValue>>
        Specified by:
        iterator in interface com.aspose.ms.System.Collections.IEnumerable<com.aspose.ms.System.Collections.Generic.KeyValuePair<String,XmpValue>>
        Specified by:
        iterator in interface Iterable<com.aspose.ms.System.Collections.Generic.KeyValuePair<String,XmpValue>>
        Returns:
        Enumerator.
      • isFixedSize

        public boolean isFixedSize()

        Checks if colleciton has fixed size.

        Returns:
        boolean value
      • isReadOnly

        public boolean isReadOnly()

        Checks if collection is read-only.

        Specified by:
        isReadOnly in interface com.aspose.ms.System.Collections.Generic.IGenericCollection<com.aspose.ms.System.Collections.Generic.KeyValuePair<String,XmpValue>>
        Returns:
        boolean value
      • getKeys

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

        Gets collection of metadata keys.

        Specified by:
        getKeys in interface com.aspose.ms.System.Collections.Generic.IGenericDictionary<String,XmpValue>
        Returns:
        ICollection object
      • removeItemByKey

        public boolean removeItemByKey(String key)

        Removes entry from metadata.

        Specified by:
        removeItemByKey in interface com.aspose.ms.System.Collections.Generic.IGenericDictionary<String,XmpValue>
        Parameters:
        key - The key of entry to remove.
      • getValues

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

        Gets values in the metadata.

        Specified by:
        getValues in interface com.aspose.ms.System.Collections.Generic.IGenericDictionary<String,XmpValue>
        Returns:
        ICollection object
      • getExtensionFields_Internal

        public com.aspose.ms.System.Collections.Generic.IGenericDictionary<String,XmpPdfAExtensionSchema> getExtensionFields_Internal()
        For Internal usage only.

        Gets the dictionary of extension fields.

        Returns:
        internal object
      • getExtensionFields

        public Hashtable<String,XmpPdfAExtensionSchema> getExtensionFields()

        Gets the dictionary of extension fields.

        Returns:
        Hashtable<String, XmpPdfAExtensionSchema> object
      • get_Item

        public XmpValue get_Item(String key)

        Gets data from metadata.

        Specified by:
        get_Item in interface com.aspose.ms.System.Collections.Generic.IGenericDictionary<String,XmpValue>
        Parameters:
        key - The key name.
        Returns:
        Metadata object.
      • set_Item

        public void set_Item(String key,
                             XmpValue value)

        Sets data from metadata.

        Specified by:
        set_Item in interface com.aspose.ms.System.Collections.Generic.IGenericDictionary<String,XmpValue>
        Parameters:
        key - key name
        value - The value object
      • copyToTArray

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

        Copies elements of the collection into array.

        Specified by:
        copyToTArray in interface com.aspose.ms.System.Collections.Generic.IGenericCollection<com.aspose.ms.System.Collections.Generic.KeyValuePair<String,XmpValue>>
        Parameters:
        array - Destination array.
        index - Starting index.
      • size

        public int size()

        Gets count of elements in the collection.

        Specified by:
        size in interface com.aspose.ms.System.Collections.Generic.IGenericCollection<com.aspose.ms.System.Collections.Generic.KeyValuePair<String,XmpValue>>
        Returns:
        int value
      • isSynchronized

        public boolean isSynchronized()

        Checks if collection is synchronized.

        Returns:
        boolean value
      • getSyncRoot

        public Object getSyncRoot()

        Gets collection synchronization object.

        Returns:
        Object for synchronization
      • iteratorIE

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

        Gets enumerator of the collection.

        Returns:
        IEnumerator object
        See Also:
        IEnumerator
      • iterator_Rename_Namesake

        public com.aspose.ms.System.Collections.IEnumerator iterator_Rename_Namesake()
      • copyTo

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

        Copies elements of the collection into array.

        Parameters:
        array - Destination array.
        index - Starting index.
      • containsKey

        public boolean containsKey(String key)

        Determines does this dictionary contasins specified key.

        Specified by:
        containsKey in interface com.aspose.ms.System.Collections.Generic.IGenericDictionary<String,XmpValue>
        Parameters:
        key - Key to search in the dictionary.
        Returns:
        true if key is found.
      • tryGetValue

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

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

        Specified by:
        tryGetValue in interface com.aspose.ms.System.Collections.Generic.IGenericDictionary<String,XmpValue>
        Parameters:
        key - Key to search in the dictionary.
        value - Retreived value.
        Returns:
        true if key was found.
      • tryGetValue

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

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

        Parameters:
        key - Key to search in the dictionary.
        value - Retreived value.
        Returns:
        true if key was found.
      • addItem

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

        Adds pair with key and value into the dictionary.

        Specified by:
        addItem in interface com.aspose.ms.System.Collections.Generic.IGenericCollection<com.aspose.ms.System.Collections.Generic.KeyValuePair<String,XmpValue>>
        Parameters:
        item - Item to be added.
      • containsItem

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

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

        Specified by:
        containsItem in interface com.aspose.ms.System.Collections.Generic.IGenericCollection<com.aspose.ms.System.Collections.Generic.KeyValuePair<String,XmpValue>>
        Parameters:
        item - Key-value pair.
        Returns:
        true if this pauir was found.
      • removeItem

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

        Removes key/value pair from the colleciton.

        Specified by:
        removeItem in interface com.aspose.ms.System.Collections.Generic.IGenericCollection<com.aspose.ms.System.Collections.Generic.KeyValuePair<String,XmpValue>>
        Parameters:
        item - Key/value pair to be removed.
        Returns:
        true if pair was found and removed.