com.groupdocs.metadata.core

Interfaces

Classes

Enums

Exceptions

com.groupdocs.metadata.core

Class WordProcessingPackage

  • All Implemented Interfaces:
    Iterable<MetadataProperty>


    public class WordProcessingPackage
    extends DocumentPackage

    Represents a native metadata package in a word processing document.

    Learn more

    This code sample shows how to update built-in metadata properties in a WordProcessing document.

    
     try (Metadata metadata = new Metadata(Constants.InputDoc)) {
         WordProcessingRootPackage root = metadata.getRootPackageGeneric();
         root.getDocumentProperties().setAuthor("test author");
         root.getDocumentProperties().setCreatedTime(new Date());
         root.getDocumentProperties().setCompany("GroupDocs");
         root.getDocumentProperties().setCategory("test category");
         root.getDocumentProperties().setKeywords("metadata, built-in, update");
         // ...
         metadata.save(Constants.OutputDoc);
     }
     
    • Method Detail

      • getAuthor

        public final String getAuthor()

        Gets the document's author.

        Returns:
        The author.
      • setAuthor

        public final void setAuthor(String value)

        Sets the document's author.

        Parameters:
        value - The author.
      • getBytesInDocument

        public final Integer getBytesInDocument()

        Gets an estimate of the number of bytes in the document.

        Returns:
        An estimate of the number of bytes in the document.
      • getCategory

        public final String getCategory()

        Gets the category.

        Returns:
        The category.
      • setCategory

        public final void setCategory(String value)

        Sets the category.

        Parameters:
        value - The category.
      • getComments

        public final String getComments()

        Gets the comments.

        Returns:
        The comments.
      • setComments

        public final void setComments(String value)

        Sets the comments.

        Parameters:
        value - The comments.
      • getCompany

        public final String getCompany()

        Gets the company.

        Returns:
        The company.
      • setCompany

        public final void setCompany(String value)

        Sets the company.

        Parameters:
        value - The company.
      • getContentStatus

        public final String getContentStatus()

        Gets the content status.

        Returns:
        The content status.
      • setContentStatus

        public final void setContentStatus(String value)

        Sets the content status.

        Parameters:
        value - The content status.
      • getContentType

        public final String getContentType()

        Gets the content type of the document.

        Returns:
        The type of the content.
      • setContentType

        public final void setContentType(String value)

        Sets the content type of the document.

        Parameters:
        value - The type of the content.
      • getCreatedTime

        public final Date getCreatedTime()

        Gets the document created date.

        Returns:
        The created time.
      • setCreatedTime

        public final void setCreatedTime(Date value)

        Sets the document created date.

        Parameters:
        value - The created time.
      • getHyperlinkBase

        public final String getHyperlinkBase()

        Gets the hyperlink base.

        Returns:
        The hyperlink base.
      • setHyperlinkBase

        public final void setHyperlinkBase(String value)

        Sets the hyperlink base.

        Parameters:
        value - The hyperlink base.
      • getKeywords

        public final String getKeywords()

        Gets the keywords.

        Returns:
        The keywords.
      • setKeywords

        public final void setKeywords(String value)

        Sets the keywords.

        Parameters:
        value - The keywords.
      • getSubject

        public final String getSubject()

        Gets the subject.

        Returns:
        The subject.
      • setSubject

        public final void setSubject(String value)

        Sets the subject.

        Parameters:
        value - The subject.
      • getTemplate

        public final String getTemplate()

        Gets the template.

        Returns:
        The template.
      • setTemplate

        public final void setTemplate(String value)

        Sets the template.

        Parameters:
        value - The template.
      • getLastPrintedDate

        public final Date getLastPrintedDate()

        Gets the last printed date.

        Returns:
        The last printed date.
      • setLastPrintedDate

        public final void setLastPrintedDate(Date value)

        Sets the last printed date.

        Parameters:
        value - The last printed date.
      • getLastSavedBy

        public final String getLastSavedBy()

        Gets the name of the last author.

        Returns:
        The name of the last author.
      • setLastSavedBy

        public final void setLastSavedBy(String value)

        Sets the name of the last author.

        Parameters:
        value - The name of the last author.
      • getLastSavedTime

        public final Date getLastSavedTime()

        Gets the time of the last save.

        Returns:
        The time of the last save.
      • setLastSavedTime

        public final void setLastSavedTime(Date value)

        Sets the time of the last save.

        Parameters:
        value - The time of the last save.
      • getManager

        public final String getManager()

        Gets the manager.

        Returns:
        The manager.
      • setManager

        public final void setManager(String value)

        Sets the manager.

        Parameters:
        value - The manager.
      • getNameOfApplication

        public final String getNameOfApplication()

        Gets the name of the application.

        Returns:
        The name of the application.
      • getRevisionNumber

        public final Integer getRevisionNumber()

        Gets the revision number.

        Returns:
        The revision number.
      • setRevisionNumber

        public final void setRevisionNumber(Integer value)

        Sets the revision number.

        Parameters:
        value - The revision number.
      • getVersion

        public final Integer getVersion()

        Gets the version number of the application that created the document.

        Returns:
        The version number of the application that created the document.


        When a document was created by Microsoft Word, then high 16 bit represent the major version and low 16 bit represent the build number.

      • getTotalEditingTime

        public final Integer getTotalEditingTime()

        Gets the total editing time in minutes.

        Returns:
        The total editing time in minutes.
      • setTotalEditingTime

        public final void setTotalEditingTime(Integer value)

        Sets the total editing time in minutes.

        Parameters:
        value - The total editing time in minutes.
      • getTitle

        public final String getTitle()

        Gets the title of the document.

        Returns:
        The title of the document.
      • setTitle

        public final void setTitle(String value)

        Sets the title of the document.

        Parameters:
        value - The title of the document.
      • getLinksUpToDate

        public final Boolean getLinksUpToDate()

        Gets a value indicating whether the hyperlinks in the document are up-to-date.

        Returns:
        A value indicating whether the hyperlinks in the document are up-to-date.
      • setLinksUpToDate

        public final void setLinksUpToDate(Boolean value)

        Sets a value indicating whether the hyperlinks in the document are up-to-date.

        Parameters:
        value - A value indicating whether the hyperlinks in the document are up-to-date.
      • getTitlesOfParts

        public final String[] getTitlesOfParts()

        Gets the titles of document parts. Read-only.

        Returns:
        The titles of document parts.
      • set

        public final void set(String propertyName,
                              String value)

        Adds or replaces the metadata property with the specified name.

        Parameters:
        propertyName - The property name.
        value - The property value.
      • set

        public final void set(String propertyName,
                              boolean value)

        Adds or replaces the metadata property with the specified name.

        Parameters:
        propertyName - The property name.
        value - The property value.
      • set

        public final void set(String propertyName,
                              Date value)

        Adds or replaces the metadata property with the specified name.

        Parameters:
        propertyName - The property name.
        value - The property value.
      • set

        public final void set(String propertyName,
                              int value)

        Adds or replaces the metadata property with the specified name.

        Parameters:
        propertyName - The property name.
        value - The property value.
      • set

        public final void set(String propertyName,
                              double value)

        Adds or replaces the metadata property with the specified name.

        Parameters:
        propertyName - The property name.
        value - The property value.