private void ensureFileSupport(WPPrefixArea pa, Metadata metadata)
            throws UnsupportedFormatException, EncryptedDocumentException {
        if (pa.getMajorVersion() != WPPrefixArea.WP5_MAJOR_VERSION &&
                pa.getMajorVersion() != WPPrefixArea.WP6_MAJOR_VERSION) {
            metadata.set(Metadata.CONTENT_TYPE, WP_UNK.toString());
            throw new UnsupportedFormatException(
                    "Parser doesn't recognize this major version: " + pa.getMajorVersion());
        }
        if (pa.isEncrypted()) {
            throw new EncryptedDocumentException();
        }
    }
<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