WordProcessingRootPackage
Inheritance: java.lang.Object, com.groupdocs.metadata.core.MetadataPackage, com.groupdocs.metadata.core.RootMetadataPackage, com.groupdocs.metadata.core.DocumentRootPackage
All Implemented Interfaces: com.groupdocs.metadata.core.IDublinCore
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()); // … }
Methods
Method | Description |
---|---|
getWordProcessingType() | Gets the file type metadata package. |
getDublinCorePackage() | Gets the Dublin Core metadata package extracted from the document. |
getInspectionPackage() | Gets a metadata package containing inspection results for the document. |
getDocumentStatistics() | Gets the document statistics package. |
updateDocumentStatistics() | Recalculates count of pages, paragraphs, words, lines, characters in the document and updates appropriate metadata packages. |
getWordProcessingType()
public final WordProcessingTypePackage getWordProcessingType()
Gets the file type metadata package.
Returns: WordProcessingTypePackage - The file type metadata package.
getDublinCorePackage()
public final DublinCorePackage getDublinCorePackage()
Gets the Dublin Core metadata package extracted from the document.
Returns: DublinCorePackage - 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: WordProcessingInspectionPackage - A metadata package containing inspection results for the document.
getDocumentStatistics()
public final DocumentStatistics getDocumentStatistics()
Gets the document statistics package.
Returns: DocumentStatistics - 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.