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()); // ... }
Modifier and Type | Method and Description |
---|---|
DocumentStatistics |
getDocumentStatistics()
Gets the document statistics package.
|
DublinCorePackage |
getDublinCorePackage()
Gets the Dublin Core metadata package extracted from the document.
|
WordProcessingInspectionPackage |
getInspectionPackage()
Gets a metadata package containing inspection results for the document.
|
WordProcessingTypePackage |
getWordProcessingType()
Gets the file type metadata package.
|
void |
updateDocumentStatistics()
Recalculates count of pages, paragraphs, words, lines, characters in the document and updates appropriate metadata packages.
|
getDocumentProperties
getFileType, sanitize
addProperties, contains, findProperties, get_Item, getCount, getKeys, getKnowPropertyDescriptors, getMetadataType, getPropertyDescriptors, iterator, removeProperties, setProperties, updateProperties
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public final WordProcessingTypePackage getWordProcessingType()
Gets the file type metadata package.
public final DublinCorePackage getDublinCorePackage()
Gets the Dublin Core metadata package extracted from the document.
getDublinCorePackage
in interface IDublinCore
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.
public final DocumentStatistics getDocumentStatistics()
Gets the document statistics package.
public final void updateDocumentStatistics()
Recalculates count of pages, paragraphs, words, lines, characters in the document and updates appropriate metadata packages.