private void applyMetadata(WPPrefixArea pa, Metadata metadata) {
        // Should we force the more precise media type if only the base
        // form is found?  Or shall we store a friendly representation
        // of the version in a new field?
        if (metadata.get(Metadata.CONTENT_TYPE) == null) {
            if (pa.getMajorVersion() == WPPrefixArea.WP6_MAJOR_VERSION) {
                metadata.set(Metadata.CONTENT_TYPE, WP_6_x.toString());
            } else if (pa.getMinorVersion() == WPPrefixArea.WP5_0_MINOR_VERSION) {
                metadata.set(Metadata.CONTENT_TYPE, WP_5_0.toString());
            } else if (pa.getMinorVersion() == WPPrefixArea.WP5_1_MINOR_VERSION) {
                metadata.set(Metadata.CONTENT_TYPE, WP_5_1.toString());
            } else {
                metadata.set(Metadata.CONTENT_TYPE, WP_BASE.toString());
            }
        }

        metadata.set(WordPerfect.FILE_ID, pa.getFileId());
        metadata.set(WordPerfect.PRODUCT_TYPE, pa.getProductType());
        metadata.set(WordPerfect.FILE_TYPE, pa.getFileType());
        metadata.set(WordPerfect.MAJOR_VERSION, pa.getMajorVersion());
        metadata.set(WordPerfect.MINOR_VERSION, pa.getMinorVersion());
        metadata.set(WordPerfect.ENCRYPTED, Boolean.toString(pa.isEncrypted()));

        if (pa.getFileSize() > -1) {
            metadata.set(WordPerfect.FILE_SIZE, Long.toString(pa.getFileSize()));
        }
    }
<p>Parser for Corel WordPerfect documents. Targets WP6 File Format
but appears to be compatible with more recent versions too.</p>

@author Pascal Essiembre
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-miscoffice-module/src/main/java/org/apache/tika/parser/wordperfect/WordPerfectParser.java