|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdk.netarkivet.common.utils.batch.ArchiveBatchFilter
public abstract class ArchiveBatchFilter
A filter class for batch entries. Allows testing whether or not to process an entry without loading the entry data first. accept() is given an ArchiveRecord to avoid unnecessary reading and copying of data of records not accepted by filter.
Field Summary | |
---|---|
static ArchiveBatchFilter |
EXCLUDE_NON_RESPONSE_RECORDS
A default filter: Accepts only response records. |
static ArchiveBatchFilter |
EXCLUDE_NON_WARCINFO_RECORDS
A default filter: Accepts only response records. |
protected java.lang.String |
name
The name of the BatchFilter. |
static ArchiveBatchFilter |
NO_FILTER
A default filter: Accepts everything. |
static ArchiveBatchFilter |
ONLY_HTTP_ENTRIES
Filter that only accepts records where the url starts with http. |
Constructor Summary | |
---|---|
protected |
ArchiveBatchFilter(java.lang.String name)
Create a new filter with the given name. |
Method Summary | |
---|---|
abstract boolean |
accept(ArchiveRecordBase record)
Check if a given record is accepted (not filtered out) by this filter. |
static ArchiveBatchFilter |
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 |
---|
protected java.lang.String name
public static final ArchiveBatchFilter NO_FILTER
public static final ArchiveBatchFilter EXCLUDE_NON_RESPONSE_RECORDS
public static final ArchiveBatchFilter EXCLUDE_NON_WARCINFO_RECORDS
public static final ArchiveBatchFilter ONLY_HTTP_ENTRIES
Constructor Detail |
---|
protected ArchiveBatchFilter(java.lang.String name)
name
- The name of this filter, for debugging mostly.Method Detail |
---|
protected java.lang.String getName()
public abstract boolean accept(ArchiveRecordBase record)
record
- a given archive record
public static ArchiveBatchFilter 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 invalid)public static boolean mimetypeIsOk(java.lang.String mimetype)
mimetype
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |