dk.netarkivet.common.utils.cdx
Class ARCFilenameCDXRecordFilter

java.lang.Object
  extended by dk.netarkivet.common.utils.cdx.SimpleCDXRecordFilter
      extended by dk.netarkivet.common.utils.cdx.ARCFilenameCDXRecordFilter
All Implemented Interfaces:
CDXRecordFilter, java.io.Serializable

public class ARCFilenameCDXRecordFilter
extends SimpleCDXRecordFilter

A filter to use in CDXReader when finding CDXRecords matching a filename-pattern.

See Also:
Serialized Form

Constructor Summary
ARCFilenameCDXRecordFilter(java.lang.String arcfilenamepattern, java.lang.String filtername)
          Class constructor.
 
Method Summary
 java.lang.String getFilenamePattern()
          Get the filename pattern used by this filter.
 boolean process(CDXRecord cdxrec)
          Process one CDXRecord - return true/false.
 
Methods inherited from class dk.netarkivet.common.utils.cdx.SimpleCDXRecordFilter
getFilterName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ARCFilenameCDXRecordFilter

public ARCFilenameCDXRecordFilter(java.lang.String arcfilenamepattern,
                                  java.lang.String filtername)
                           throws ArgumentNotValid
Class constructor.

Parameters:
arcfilenamepattern - The filename pattern to be used by this filter
filtername - The name of this filter
Throws:
ArgumentNotValid - If any argument are null or an empty string.
Method Detail

getFilenamePattern

public java.lang.String getFilenamePattern()
Get the filename pattern used by this filter.

Returns:
the filename pattern used by this filter.

process

public boolean process(CDXRecord cdxrec)
Description copied from interface: CDXRecordFilter
Process one CDXRecord - return true/false.

Specified by:
process in interface CDXRecordFilter
Specified by:
process in class SimpleCDXRecordFilter
Parameters:
cdxrec - the CDXRecord to be processed.
Returns:
true or false on whether the processed CDXRecord is "valid" according to this filter implementation. true means this CDXRecord is valid!