com.groupdocs.parser

Interfaces

Classes

Exceptions

com.groupdocs.parser

Class MetadataCollection



  • public final class MetadataCollection
    extends Object

    Provides the metadata for a document.

    Setting the value to the metadata:

     metadataCollection.set_Item("CONTENT_TYPE", "application/word");
      

    Getting the value from the metadata:

     String author = metadataCollection.get_Item(MetadataNames.AUTHOR);
      

    Getting all metadata's keys:

    • Constructor Detail

      • MetadataCollection

        public MetadataCollection()

        Initializes a new instance of the MetadataCollection class.

    • Method Detail

      • isEmpty

        public boolean isEmpty()

        Gets a value indicating whether the metadata has data.

        Returns:
        Value is true if metadata has data; otherwise, false.
      • getKeys

        public List<String> getKeys()

        Gets a collection containing the keys in the MetadataCollection.

        Returns:
        A collection containing the keys in the MetadataCollection.
      • get_Item

        public String get_Item(String key)

        Gets a value associated with the specified key.

        Parameters:
        key - The key of the value to get or set.
        Returns:
        The value associated with the specified key. If the specified key is not found, a get operation returns null. A set operation creates a new element with the specified key.
      • set_Item

        public void set_Item(String key,
                    String value)

        Sets a value associated with the specified key.

        Parameters:
        value - The value associated with the specified key. If the specified key is not found, a get operation returns null. A set operation creates a new element with the specified key.
        key - The key of the value to get or set.
      • containsKey

        public boolean containsKey(String key)

        Determines whether the MetadataCollection contains the specified key.

        Parameters:
        key - The key to locate in the MetadataCollection.
        Returns:
        A boolean true if the metadata contains key; otherwise, false.