class TrapSuppressExtractor extends ContentExtractor  {
    @SuppressWarnings("unused")
    private static final long serialVersionUID = -1028783453022579530L;

    /** ALIst attribute key for carrying-forward content-digest from 'via'*/
    public static String A_VIA_DIGEST = "via-digest";
    
    protected long numberOfCURIsHandled = 0;
    protected long numberOfCURIsSuppressed = 0;

    /**
     * Usual constructor. 
     */
    public TrapSuppressExtractor() {
    }

    protected boolean shouldExtract(CrawlURI uri) {
        return true; 
    }
    
    protected boolean innerExtract(CrawlURI curi){<FILL_FUNCTION_BODY>}
}

        numberOfCURIsHandled++;

        String currentDigest = curi.getContentDigestSchemeString();
        String viaDigest = null;
        if(curi.containsDataKey(A_VIA_DIGEST)) {
            viaDigest = (String) curi.getData().get(A_VIA_DIGEST);
        }
        
        if(currentDigest!=null) {
            curi.makeHeritable(A_VIA_DIGEST);
            if(currentDigest.equals(viaDigest)) {
                curi.getAnnotations().add("trapSuppressExtractor");
                numberOfCURIsSuppressed++;
                // mark as already-extracted -- suppressing further extraction
                return true;
            }
            // already consulted; so clobber with current value to be 
            // inherited
            curi.getData().put(A_VIA_DIGEST, currentDigest);
        }
        return false; 
    
<methods>public non-sealed void <init>() <variables>