com.groupdocs.metadata.core

Interfaces

Classes

Enums

Exceptions

com.groupdocs.metadata.core

Class WordProcessingRootPackage

  • All Implemented Interfaces:
    IDublinCore, Iterable<MetadataProperty>


    public class WordProcessingRootPackage
    extends DocumentRootPackage<WordProcessingPackage>
    implements IDublinCore

    Represents the root package allowing working with metadata in a word processing document.

    Learn more

    This code sample demonstrates how to read built-in metadata properties of a WordProcessing document.

    
     try (Metadata metadata = new Metadata(Constants.InputDocx)) {
         WordProcessingRootPackage root = metadata.getRootPackageGeneric();
         System.out.println(root.getDocumentProperties().getAuthor());
         System.out.println(root.getDocumentProperties().getCreatedTime());
         System.out.println(root.getDocumentProperties().getCompany());
         System.out.println(root.getDocumentProperties().getCategory());
         System.out.println(root.getDocumentProperties().getKeywords());
         // ...
     }
     
    • Method Detail

      • getWordProcessingType

        public final WordProcessingTypePackage getWordProcessingType()

        Gets the file type metadata package.

        Returns:
        The file type metadata package.
      • getDublinCorePackage

        public final DublinCorePackage getDublinCorePackage()

        Gets the Dublin Core metadata package extracted from the document.

        Specified by:
        getDublinCorePackage in interface IDublinCore
        Returns:
        The Dublin Core metadata package extracted from the document.
      • getInspectionPackage

        public final WordProcessingInspectionPackage getInspectionPackage()

        Gets a metadata package containing inspection results for the document. The package contains information about document parts that can be considered as metadata in some cases.

        Returns:
        A metadata package containing inspection results for the document.
      • getDocumentStatistics

        public final DocumentStatistics getDocumentStatistics()

        Gets the document statistics package.

        Returns:
        The document statistics package.
      • updateDocumentStatistics

        public final void updateDocumentStatistics()

        Recalculates count of pages, paragraphs, words, lines, characters in the document and updates appropriate metadata packages.