|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdk.netarkivet.common.utils.batch.WARCBatchFilter
public abstract class WARCBatchFilter
A filter class for batch entries. Allows testing whether or not to process an entry without loading the entry data first. The class in itself is abstract but contains implementation of several filters.
Field Summary | |
---|---|
static WARCBatchFilter |
EXCLUDE_NON_RESPONSE_RECORDS
A default filter: Accepts on response records. |
static WARCBatchFilter |
NO_FILTER
A default filter: Accepts everything. |
static WARCBatchFilter |
ONLY_HTTP_ENTRIES
Filter that only accepts records where the url starts with http. |
Constructor Summary | |
---|---|
protected |
WARCBatchFilter(java.lang.String name)
Create a new filter with the given name. |
Method Summary | |
---|---|
abstract boolean |
accept(org.archive.io.warc.WARCRecord record)
Check if a given record is accepted (not filtered out) by this filter. |
static WARCBatchFilter |
getMimetypeBatchFilter(java.lang.String mimetype)
Note that the mimetype of the WARC responserecord is not (necessarily) the same as its payload. |
protected java.lang.String |
getName()
Get the name of the filter. |
static boolean |
mimetypeIsOk(java.lang.String mimetype)
Check, if a certain mimetype is valid. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final WARCBatchFilter NO_FILTER
public static final WARCBatchFilter EXCLUDE_NON_RESPONSE_RECORDS
public static final WARCBatchFilter ONLY_HTTP_ENTRIES
Constructor Detail |
---|
protected WARCBatchFilter(java.lang.String name)
name
- The name of this filter, for debugging mostly.Method Detail |
---|
protected java.lang.String getName()
public static WARCBatchFilter getMimetypeBatchFilter(java.lang.String mimetype) throws java.awt.datatransfer.MimeTypeParseException
mimetype
- String denoting the mimetype this filter represents
java.awt.datatransfer.MimeTypeParseException
- If mimetype is invalidpublic static boolean mimetypeIsOk(java.lang.String mimetype)
mimetype
- a given mimetype
public abstract boolean accept(org.archive.io.warc.WARCRecord record)
record
- a given WARCRecord
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |