public abstract class ARCBatchFilter extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
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.
|
Modifier | Constructor and Description |
---|---|
protected |
ARCBatchFilter(String name)
Create a new filter with the given name.
|
Modifier and Type | Method and Description |
---|---|
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(String mimetype) |
protected String |
getName()
Get the name of the filter.
|
static boolean |
mimetypeIsOk(String mimetype)
Check, if a certain mimetype is valid.
|
public static final ARCBatchFilter NO_FILTER
public static final ARCBatchFilter EXCLUDE_FILE_HEADERS
public static final ARCBatchFilter ONLY_HTTP_ENTRIES
protected ARCBatchFilter(String name)
name
- The name of this filter, for debugging mostly.public static ARCBatchFilter getMimetypeBatchFilter(String mimetype) throws MimeTypeParseException
mimetype
- String denoting the mimetype this filter representsMimeTypeParseException
- If mimetype is invalidpublic static boolean mimetypeIsOk(String mimetype)
mimetype
- a given mimetypepublic abstract boolean accept(org.archive.io.arc.ARCRecord record)
record
- a given ARCRecordCopyright © 2005–2018 The Royal Danish Library, the National Library of France and the Austrian National Library.. All rights reserved.