private boolean shouldDigest(Metadata metadata) {
        if (digester == null) {
            return false;
        }
        if (! skipContainerDocument) {
            return true;
        }
        Integer parseDepth = metadata.getInt(TikaCoreProperties.EMBEDDED_DEPTH);
        if (parseDepth == null || parseDepth == 0) {
            return false;
        }
        return true;
    }
Creates a decorator for the given parser.

@param parser the parser instance to be decorated
tika-core/src/main/java/org/apache/tika/parser/DigestingParser.java