|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.netarkivet.common.utils.batch.ARCBatchFilter
public abstract class ARCBatchFilter
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 ARCBatchFilter |
EXCLUDE_FILE_HEADERS
A default filter: Accepts all but the first file. |
static ARCBatchFilter |
NO_FILTER
A default filter: Accepts everything. |
static ARCBatchFilter |
ONLY_HTTP_ENTRIES
Filter that only accepts records where the url starts with http. |
Constructor Summary | |
---|---|
protected |
ARCBatchFilter(java.lang.String name)
Create a new filter with the given name. |
Method Summary | |
---|---|
abstract boolean |
accept(org.archive.io.arc.ARCRecord record)
Check if a given record is accepted (not filtered out) by this filter. |
static ARCBatchFilter |
getMimetypeBatchFilter(java.lang.String mimetype)
|
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 ARCBatchFilter NO_FILTER
public static final ARCBatchFilter EXCLUDE_FILE_HEADERS
public static final ARCBatchFilter ONLY_HTTP_ENTRIES
Constructor Detail |
---|
protected ARCBatchFilter(java.lang.String name)
name
- The name of this filter, for debugging mostly.Method Detail |
---|
protected java.lang.String getName()
public static ARCBatchFilter 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.arc.ARCRecord record)
record
- a given ARCRecord
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |